diff options
author | Chao Yu <chao@kernel.org> | 2021-08-09 02:24:48 +0200 |
---|---|---|
committer | Jaegeuk Kim <jaegeuk@kernel.org> | 2021-08-17 20:59:05 +0200 |
commit | 324105775c1982aacbd2972b7024d8cc06474abe (patch) | |
tree | aed4271a090d9f97d9e3f9005c375b04ea523393 /fs/f2fs/xattr.c | |
parent | f2fs: compress: allow write compress released file after truncate to zero (diff) | |
download | linux-324105775c1982aacbd2972b7024d8cc06474abe.tar.xz linux-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/xattr.c')
-rw-r--r-- | fs/f2fs/xattr.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/f2fs/xattr.c b/fs/f2fs/xattr.c index c8f34decbf8e..1d2d29dcd41c 100644 --- a/fs/f2fs/xattr.c +++ b/fs/f2fs/xattr.c @@ -27,7 +27,8 @@ static void *xattr_alloc(struct f2fs_sb_info *sbi, int size, bool *is_inline) { if (likely(size == sbi->inline_xattr_slab_size)) { *is_inline = true; - return kmem_cache_zalloc(sbi->inline_xattr_slab, GFP_NOFS); + return f2fs_kmem_cache_alloc(sbi->inline_xattr_slab, + GFP_F2FS_ZERO, false, sbi); } *is_inline = false; return f2fs_kzalloc(sbi, size, GFP_NOFS); |