Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit a6f498a8 authored by Trond Myklebust's avatar Trond Myklebust
Browse files

NFS: Fix a regression in the referral code



Fix a regression that was introduced by commit
0c2e53f1 (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: default avatarTigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Tested-by: default avatarTigran Mkrtchyan <tigran.mkrtchyan@desy.de>
Signed-off-by: default avatarTrond Myklebust <Trond.Myklebust@netapp.com>
parent 0486958f
Loading
Loading
Loading
Loading
+1 −2
Original line number Diff line number Diff line
@@ -2464,8 +2464,7 @@ static int nfs4_proc_lookup(struct rpc_clnt *clnt, struct inode *dir, struct qst
		case -NFS4ERR_BADNAME:
			return -ENOENT;
		case -NFS4ERR_MOVED:
			err = nfs4_get_referral(dir, name, fattr, fhandle);
			break;
			return nfs4_get_referral(dir, name, fattr, fhandle);
		case -NFS4ERR_WRONGSEC:
			nfs_fixup_secinfo_attributes(fattr, fhandle);
		}