NFS: Fix an Oops in nfs_d_automount()
[ Upstream commit35e3b6ae84] When mounting from a NFSv4 referral, path->dentry can end up being a negative dentry, so derive the struct nfs_server from the dentry itself instead. Fixes:2b0143b5c9("VFS: normal filesystems (and lustre): d_inode() annotations") Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com> Signed-off-by: Sasha Levin <sashal@kernel.org>
This commit is contained in:
parent
bc60485b93
commit
5458bc0f9d
1 changed files with 1 additions and 1 deletions
|
|
@ -147,7 +147,7 @@ struct vfsmount *nfs_d_automount(struct path *path)
|
|||
struct nfs_fs_context *ctx;
|
||||
struct fs_context *fc;
|
||||
struct vfsmount *mnt = ERR_PTR(-ENOMEM);
|
||||
struct nfs_server *server = NFS_SERVER(d_inode(path->dentry));
|
||||
struct nfs_server *server = NFS_SB(path->dentry->d_sb);
|
||||
struct nfs_client *client = server->nfs_client;
|
||||
int timeout = READ_ONCE(nfs_mountpoint_expiry_timeout);
|
||||
int ret;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue