summaryrefslogtreecommitdiff
path: root/fs/ksmbd/vfs_cache.h
diff options
context:
space:
mode:
authorNamjae Jeon <namjae.jeon@samsung.com>2021-06-29 09:22:16 +0900
committerNamjae Jeon <namjae.jeon@samsung.com>2021-06-29 15:07:44 +0900
commit493fa2fbe4597db474e43d38fb8805cbaef654ac (patch)
treef53ab4bb9c7ef19199531353402eeae729ca4253 /fs/ksmbd/vfs_cache.h
parenta5a25a114ab2412831f063361360eb1192ca6151 (diff)
ksmbd: fix dentry racy with rename()
Using ->d_name can be broken due to races with rename(). So use %pd with ->d_name to print filename and In other cases, use it under ->d_lock. Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Namjae Jeon <namjae.jeon@samsung.com> Signed-off-by: Steve French <stfrench@microsoft.com>
Diffstat (limited to 'fs/ksmbd/vfs_cache.h')
-rw-r--r--fs/ksmbd/vfs_cache.h1
1 files changed, 0 insertions, 1 deletions
diff --git a/fs/ksmbd/vfs_cache.h b/fs/ksmbd/vfs_cache.h
index 745855367106..03c36906cab0 100644
--- a/fs/ksmbd/vfs_cache.h
+++ b/fs/ksmbd/vfs_cache.h
@@ -25,7 +25,6 @@
#define KSMBD_NO_FID (UINT_MAX)
#define SMB2_NO_FID (0xFFFFFFFFFFFFFFFFULL)
-#define FP_FILENAME(fp) ((fp)->filp->f_path.dentry->d_name.name)
#define FP_INODE(fp) d_inode((fp)->filp->f_path.dentry)
#define PARENT_INODE(fp) d_inode((fp)->filp->f_path.dentry->d_parent)