NFS: Fix a regression in the referral code
Fix a regression that was introduced by commit 0c2e53f11a6dae9e3af5f50f5ad0382e7c3e0cfa (NFS: Remove the unused "lookupfh()" version of nfs4_proc_lookup()). In the case where the lookup gets an NFS4ERR_MOVED, we want to return the result of nfs4_get_referral(). Instead, that value is getting clobbered by the call to nfs4_handle_exception()... Reported-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Tested-by: Tigran Mkrtchyan <tigran.mkrtchyan@desy.de> Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
This commit is contained in:
parent
0486958f57
commit
a6f498a891
@ -2464,8 +2464,7 @@ static int nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qst
|
|||||||
case -NFS4ERR_BADNAME:
|
case -NFS4ERR_BADNAME:
|
||||||
return -ENOENT;
|
return -ENOENT;
|
||||||
case -NFS4ERR_MOVED:
|
case -NFS4ERR_MOVED:
|
||||||
err = nfs4_get_referral(dir, name, fattr, fhandle);
|
return nfs4_get_referral(dir, name, fattr, fhandle);
|
||||||
break;
|
|
||||||
case -NFS4ERR_WRONGSEC:
|
case -NFS4ERR_WRONGSEC:
|
||||||
nfs_fixup_secinfo_attributes(fattr, fhandle);
|
nfs_fixup_secinfo_attributes(fattr, fhandle);
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user