From: Dominique Martinet Date: Thu, 4 Jun 2015 15:04:17 +0000 (+0200) Subject: NFSv4: handle nfs4_get_referral failure X-Git-Tag: v5.15~15360^2~68 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=c86c90c656fa2c94c2491dd86cf09501193f0dad;p=platform%2Fkernel%2Flinux-starfive.git 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 Signed-off-by: Frank S. Filz Signed-off-by: Dominique Martinet Signed-off-by: Trond Myklebust --- diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 55e1e3a..d689ea3 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;