mirror of
https://github.com/torvalds/linux.git
synced 2026-07-27 09:36:22 +02:00
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>
This commit is contained in:
parent
cf716276b0
commit
8b938ae6f0
|
|
@ -1455,6 +1455,9 @@ static int f2fs_write_compressed_pages(struct compress_ctx *cc,
|
|||
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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user