[PATCH 6.4 615/800] f2fs: fix the wrong condition to determine atomic context

Greg Kroah-Hartman
2023-07-16T20:21:38Z

From: Jaegeuk Kim <jaegeuk@kernel.org>

[ Upstream commit 633c8b9409f564ce4b7f7944c595ffac27ed1ff4 ]

Should use !in_task for irq context.

Cc: stable@vger.kernel.org
Fixes: 1aa161e43106 ("f2fs: fix scheduling while atomic in decompression path")
Reviewed-by: Chao Yu <chao@kernel.org>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Stable-dep-of: 901c12d14457 ("f2fs: flush error flags in workqueue")
Signed-off-by: Sasha Levin <sashal@kernel.org>
---
fs/f2fs/compress.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 2ec7cf4544180..905b7c39a2b32 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -743,7 +743,7 @@ void f2fs_decompress_cluster(struct decompress_io_ctx *dic, bool in_task)
ret = -EFSCORRUPTED;

/* Avoid f2fs_commit_super in irq context */
- if (in_task)
+ if (!in_task)
f2fs_save_errors(sbi, ERROR_FAIL_DECOMPRESSION);
else
f2fs_handle_error(sbi, ERROR_FAIL_DECOMPRESSION);
--
2.39.2