aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
authorChao Yu <chao@kernel.org>2026-06-15 21:08:20 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2026-06-22 19:52:38 +0000
commit8b938ae6f0766559dfc4ad5acac958b1eff8664d (patch)
tree44d993bb3221188722ca068b7345b0465923f092 /fs
parentcf716276b0dca934aad5fe3c46df04e1dc596734 (diff)
downloadath-8b938ae6f0766559dfc4ad5acac958b1eff8664d.tar.gz
f2fs: avoid unnecessary fscrypt_finalize_bounce_page()
fscrypt_finalize_bounce_page() should be called only if we use fs layer crypto, let's avoid unnecessary fscrypt_finalize_bounce_page() in error path of f2fs_write_compressed_pages(). BTW, fscrypt_finalize_bounce_page() will check mapping of bounced page before retrieving original page, so, previously it won't cause any issue w/ fscrypt_finalize_bounce_page(), but still we'd better avoid coupling w/ any logic inside fscrypt_finalize_bounce_page(). Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs')
-rw-r--r--fs/f2fs/compress.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/fs/f2fs/compress.c b/fs/f2fs/compress.c
index 372e07c58e21a..6e1c0ea9f6c9e 100644
--- a/fs/f2fs/compress.c
+++ b/fs/f2fs/compress.c
@@ -1455,6 +1455,9 @@ unlock_continue:
out_destroy_crypt:
page_array_free(sbi, cic->rpages, cc->cluster_size);
+ if (!fio.encrypted)
+ goto out_put_cic;
+
for (--i; i >= 0; i--) {
if (!cc->cpages[i])
continue;