summaryrefslogtreecommitdiff
path: root/fs/f2fs/super.c
diff options
context:
space:
mode:
authorYangtao Li <frank.li@vivo.com>2022-11-25 19:47:36 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2022-12-08 09:32:20 -0800
commit870af777da22505851174a34c0228042d7ed5f5f (patch)
tree360a5b4486ed9eeb0b263b834b8df50a1a8a9437 /fs/f2fs/super.c
parent398bb30d4f4e857ee1352130c6935f0fb16d7af2 (diff)
downloadlinux-rpi-870af777da22505851174a34c0228042d7ed5f5f.tar.gz
linux-rpi-870af777da22505851174a34c0228042d7ed5f5f.tar.bz2
linux-rpi-870af777da22505851174a34c0228042d7ed5f5f.zip
f2fs: do some cleanup for f2fs module init
Just for cleanup, no functional changes. Signed-off-by: Yangtao Li <frank.li@vivo.com> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/super.c')
-rw-r--r--fs/f2fs/super.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/fs/f2fs/super.c b/fs/f2fs/super.c
index daf14b55a972..a5f6f632cf7c 100644
--- a/fs/f2fs/super.c
+++ b/fs/f2fs/super.c
@@ -288,9 +288,7 @@ static int __init f2fs_create_casefold_cache(void)
{
f2fs_cf_name_slab = f2fs_kmem_cache_create("f2fs_casefolded_name",
F2FS_NAME_LEN);
- if (!f2fs_cf_name_slab)
- return -ENOMEM;
- return 0;
+ return f2fs_cf_name_slab ? 0 : -ENOMEM;
}
static void f2fs_destroy_casefold_cache(void)
@@ -4647,9 +4645,7 @@ static int __init init_inodecache(void)
f2fs_inode_cachep = kmem_cache_create("f2fs_inode_cache",
sizeof(struct f2fs_inode_info), 0,
SLAB_RECLAIM_ACCOUNT|SLAB_ACCOUNT, NULL);
- if (!f2fs_inode_cachep)
- return -ENOMEM;
- return 0;
+ return f2fs_inode_cachep ? 0 : -ENOMEM;
}
static void destroy_inodecache(void)