projects
/
linux-block.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
a4a0e16
)
f2fs: initialize page_array_entry slab only if compression feature is on
author
Chao Yu
<chao@kernel.org>
Sat, 18 Jun 2022 17:51:55 +0000
(
01:51
+0800)
committer
Jaegeuk Kim
<jaegeuk@kernel.org>
Tue, 28 Jun 2022 16:27:10 +0000
(09:27 -0700)
Otherwise, in image which doesn't support compression feature,
page_array_entry will be initialized w/o use.
Signed-off-by: Chao Yu <chao.yu@oppo.com>
Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
fs/f2fs/compress.c
patch
|
blob
|
blame
|
history
diff --git
a/fs/f2fs/compress.c
b/fs/f2fs/compress.c
index 24824cd96f36751f9daaae583e8a431faeba0a57..fa237e5c7173b31f74ce63da84a5f1f21d9e2194 100644
(file)
--- a/
fs/f2fs/compress.c
+++ b/
fs/f2fs/compress.c
@@
-1908,6
+1908,9
@@
int f2fs_init_page_array_cache(struct f2fs_sb_info *sbi)
dev_t dev = sbi->sb->s_bdev->bd_dev;
char slab_name[32];
+ if (!f2fs_sb_has_compression(sbi))
+ return 0;
+
sprintf(slab_name, "f2fs_page_array_entry-%u:%u", MAJOR(dev), MINOR(dev));
sbi->page_array_slab_size = sizeof(struct page *) <<