From d2f72ed8fa0c0e6c90af8ee0bbb39d41ab2d5465 Mon Sep 17 00:00:00 2001 From: Hyunchul Lee Date: Thu, 1 Apr 2021 17:33:47 +0900 Subject: [PATCH] cifsd: use file_inode() instead of d_inode() use file_inode() to get layerd filesystems right. Signed-off-by: Hyunchul Lee Signed-off-by: Namjae Jeon Signed-off-by: Steve French --- fs/cifsd/vfs.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/fs/cifsd/vfs.c b/fs/cifsd/vfs.c index bdc30a7..6313d5c 100644 --- a/fs/cifsd/vfs.c +++ b/fs/cifsd/vfs.c @@ -335,7 +335,7 @@ int ksmbd_vfs_read(struct ksmbd_work *work, struct ksmbd_file *fp, size_t count, rbuf = work->aux_payload_buf; filp = fp->filp; - inode = d_inode(filp->f_path.dentry); + inode = file_inode(filp); if (S_ISDIR(inode->i_mode)) return -EISDIR; -- 2.7.4