Linux-EROFS Archive mirror
 help / color / mirror / Atom feed
From: Noboru Asai <asai@sijam.com>
To: hsiangkao@linux.alibaba.com, zhaoyifan@sjtu.edu.cn
Cc: linux-erofs@lists.ozlabs.org
Subject: [PATCH] erofs-utils: change temporal buffer to non static
Date: Mon,  8 Apr 2024 18:16:26 +0900	[thread overview]
Message-ID: <20240408091627.336554-1-asai@sijam.com> (raw)

In multi-threaded mode, each thread must use a different buffer in tryrecompress_trailing
function, so change this buffer to non static.

Signed-off-by: Noboru Asai <asai@sijam.com>
---
 lib/compress.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/compress.c b/lib/compress.c
index 641fde6..7415fda 100644
--- a/lib/compress.c
+++ b/lib/compress.c
@@ -447,7 +447,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;
 
-- 
2.44.0


             reply	other threads:[~2024-04-08  9:17 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-08  9:16 Noboru Asai [this message]
2024-04-08 10:34 ` [PATCH] erofs-utils: change temporal buffer to non static Yifan Zhao
2024-04-08 11:24   ` Gao Xiang
2024-04-08 11:23 ` Gao Xiang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20240408091627.336554-1-asai@sijam.com \
    --to=asai@sijam.com \
    --cc=hsiangkao@linux.alibaba.com \
    --cc=linux-erofs@lists.ozlabs.org \
    --cc=zhaoyifan@sjtu.edu.cn \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).