aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDominique Martinet <[email protected]>2015-06-04 17:04:17 +0200
committerTrond Myklebust <[email protected]>2015-06-10 18:28:02 -0400
commitc86c90c656fa2c94c2491dd86cf09501193f0dad (patch)
treef66299d0b5ad321346b2c9f07b2fc74827160b84
parentd67fa4d85a2143b46052b2e9ccc6749a4c97b2de (diff)
NFSv4: handle nfs4_get_referral failure
nfs4_proc_lookup_common is supposed to return a posix error, we have to handle any error returned that isn't errno Reported-by: Olga Kornievskaia <[email protected]> Signed-off-by: Frank S. Filz <[email protected]> Signed-off-by: Dominique Martinet <[email protected]> Signed-off-by: Trond Myklebust <[email protected]>
-rw-r--r--fs/nfs/nfs4proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index 55e1e3af23a3..d689ea37be84 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -3355,6 +3355,8 @@ static int nfs4_proc_lookup_common(struct rpc_clnt **clnt, struct inode *dir,
goto out;
case -NFS4ERR_MOVED:
err = nfs4_get_referral(client, dir, name, fattr, fhandle);
+ if (err == -NFS4ERR_MOVED)
+ err = nfs4_handle_exception(NFS_SERVER(dir), err, &exception);
goto out;
case -NFS4ERR_WRONGSEC:
err = -EPERM;