From e63d8c3188dbc76c573635164d39afad65306615 Mon Sep 17 00:00:00 2001 From: Sandeep Dhavale Date: Tue, 15 Apr 2025 13:29:08 -0700 Subject: [PATCH] ANDROID: f2fs: fix incorrect merge resolution in f2fs_trace_rw_file_path() The merge included commit bbedc64de04f ("f2fs: factor the read/write tracing logic into a helper") During merge we accidentally undid a part of the change from commit fae611f4f0a2 ("f2fs: allocate trace path buffer from names_cache") This patch fixes it by using f2fs_getname() to match with f2fs_putname() at the end. Bug: 409714766 Fixes: bfad6b019cf1 ("Merge tag 'android14-6.1.115_r00' into android14-6.1") Change-Id: I56f78e560c0847939773c9773064bc60561effcb Signed-off-by: Sandeep Dhavale --- fs/f2fs/file.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/f2fs/file.c b/fs/f2fs/file.c index 34d85514e225..d9728163ae6c 100644 --- a/fs/f2fs/file.c +++ b/fs/f2fs/file.c @@ -4571,7 +4571,7 @@ static void f2fs_trace_rw_file_path(struct kiocb *iocb, size_t count, int rw) struct inode *inode = file_inode(iocb->ki_filp); char *buf, *path; - buf = f2fs_kmalloc(F2FS_I_SB(inode), PATH_MAX, GFP_KERNEL); + buf = f2fs_getname(F2FS_I_SB(inode)); if (!buf) return; path = dentry_path_raw(file_dentry(iocb->ki_filp), buf, PATH_MAX);