NFS: Fix an Oops in nfs_d_automount()
authorTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 14 Nov 2022 22:30:39 +0000 (17:30 -0500)
committerTrond Myklebust <trond.myklebust@hammerspace.com>
Mon, 28 Nov 2022 03:10:00 +0000 (22:10 -0500)
commit35e3b6ae84935d0d7ff76cbdaa83411b0ad5e471
tree76b6984d626089263e9d2df43175f5ef71ef97ab
parent51069e4aef6257b0454057359faed0ab0c9af083
NFS: Fix an Oops in nfs_d_automount()

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: 2b0143b5c986 ("VFS: normal filesystems (and lustre): d_inode() annotations")
Signed-off-by: Trond Myklebust <trond.myklebust@hammerspace.com>
fs/nfs/namespace.c