erofs-utils: change ztailpacking temporary buffer to non-static
authorNoboru Asai <asai@sijam.com>
Mon, 8 Apr 2024 09:16:26 +0000 (18:16 +0900)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Fri, 12 Apr 2024 17:51:42 +0000 (01:51 +0800)
In multi-threaded mode, each thread must use a different buffer in
tryrecompress_trailing(), so change this buffer to non static.

Signed-off-by: Noboru Asai <asai@sijam.com>
Reviewed-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Link: https://lore.kernel.org/r/20240408091627.336554-1-asai@sijam.com
[ Gao Xiang: slightly refine the subject line. ]
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
lib/compress.c

index 343ccf5fe8515793bc53d022c9e26b439cf2eaa0..74c57072986a54529c3a48fb7e9a211a5ebd436a 100644 (file)
@@ -446,7 +446,7 @@ static void tryrecompress_trailing(struct z_erofs_compress_sctx *ctx,
                                   void *out, unsigned int *compressedsize)
 {
        struct erofs_sb_info *sbi = ctx->ictx->inode->sbi;
-       static char tmp[Z_EROFS_PCLUSTER_MAX_SIZE];
+       char tmp[Z_EROFS_PCLUSTER_MAX_SIZE];
        unsigned int count;
        int ret = *compressedsize;