summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/dir.c
diff options
context:
space:
mode:
authorChao Yu <chao@kernel.org>2021-08-09 08:24:48 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2021-08-17 11:59:05 -0700
commit324105775c1982aacbd2972b7024d8cc06474abe (patch)
treeaed4271a090d9f97d9e3f9005c375b04ea523393 /fs/f2fs/dir.c
parent4a4fc043f594d39edc976a3a3dce7c40ebb86f3f (diff)
downloadlinux-stable-324105775c1982aacbd2972b7024d8cc06474abe.tar.gz
linux-stable-324105775c1982aacbd2972b7024d8cc06474abe.tar.bz2
linux-stable-324105775c1982aacbd2972b7024d8cc06474abe.zip
f2fs: support fault injection for f2fs_kmem_cache_alloc()
This patch supports to inject fault into f2fs_kmem_cache_alloc(). Usage: a) echo 32768 > /sys/fs/f2fs/<dev>/inject_type or b) mount -o fault_type=32768 <dev> <mountpoint> Signed-off-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/dir.c')
-rw-r--r--fs/f2fs/dir.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/f2fs/dir.c b/fs/f2fs/dir.c
index c250bf46ef5e..1820e9c106f7 100644
--- a/fs/f2fs/dir.c
+++ b/fs/f2fs/dir.c
@@ -83,8 +83,8 @@ int f2fs_init_casefolded_name(const struct inode *dir,
struct super_block *sb = dir->i_sb;
if (IS_CASEFOLDED(dir)) {
- fname->cf_name.name = kmem_cache_alloc(f2fs_cf_name_slab,
- GFP_NOFS);
+ fname->cf_name.name = f2fs_kmem_cache_alloc(f2fs_cf_name_slab,
+ GFP_NOFS, false, F2FS_SB(sb));
if (!fname->cf_name.name)
return -ENOMEM;
fname->cf_name.len = utf8_casefold(sb->s_encoding,