summaryrefslogtreecommitdiffstats
path: root/fs/f2fs/f2fs.h
diff options
context:
space:
mode:
authorWu Bo <bo.wu@vivo.com>2023-04-14 18:43:08 +0800
committerJaegeuk Kim <jaegeuk@kernel.org>2023-04-20 09:38:12 -0700
commit5584785080045e6cd3ebc1aac49b9c0ec57f136a (patch)
tree0c88d93cad589608e959d82324cffa98d1ea3a85 /fs/f2fs/f2fs.h
parentc1660d88a064409879f6d467754bbe27259c71bb (diff)
downloadlinux-stable-5584785080045e6cd3ebc1aac49b9c0ec57f136a.tar.gz
linux-stable-5584785080045e6cd3ebc1aac49b9c0ec57f136a.tar.bz2
linux-stable-5584785080045e6cd3ebc1aac49b9c0ec57f136a.zip
f2fs: allocate trace path buffer from names_cache
It would be better to use the dedicated slab to store path. Signed-off-by: Wu Bo <bo.wu@vivo.com> Reviewed-by: Chao Yu <chao@kernel.org> Signed-off-by: Jaegeuk Kim <jaegeuk@kernel.org>
Diffstat (limited to 'fs/f2fs/f2fs.h')
-rw-r--r--fs/f2fs/f2fs.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/fs/f2fs/f2fs.h b/fs/f2fs/f2fs.h
index 6cae94d51821..d87044516fe9 100644
--- a/fs/f2fs/f2fs.h
+++ b/fs/f2fs/f2fs.h
@@ -3347,6 +3347,19 @@ static inline void *f2fs_kmalloc(struct f2fs_sb_info *sbi,
return kmalloc(size, flags);
}
+static inline void *f2fs_getname(struct f2fs_sb_info *sbi)
+{
+ if (time_to_inject(sbi, FAULT_KMALLOC))
+ return NULL;
+
+ return __getname();
+}
+
+static inline void f2fs_putname(char *buf)
+{
+ __putname(buf);
+}
+
static inline void *f2fs_kzalloc(struct f2fs_sb_info *sbi,
size_t size, gfp_t flags)
{