]> git.baikalelectronics.ru Git - kernel.git/commitdiff
f2fs: fix the wrong condition to determine atomic context
authorJaegeuk Kim <jaegeuk@kernel.org>
Fri, 5 May 2023 19:16:54 +0000 (12:16 -0700)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sun, 23 Jul 2023 11:49:29 +0000 (13:49 +0200)
commit 633c8b9409f564ce4b7f7944c595ffac27ed1ff4 upstream.

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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
fs/f2fs/compress.c

index e50d5848c10018c2a2d820bf2a33b84ba19ef0d3..fb75ff7b3448d8dd235d9f02f09f1b1848e051ec 100644 (file)
@@ -764,7 +764,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);