Skip to content

Commit 1e9fd95

Browse files
zhangxianwei8gregkh
authored andcommitted
NFSv4.1: RECLAIM_COMPLETE must handle EACCES
commit e35a5e7 upstream. A client should be able to handle getting an EACCES error while doing a mount operation to reclaim state due to NFS4CLNT_RECLAIM_REBOOT being set. If the server returns RPC_AUTH_BADCRED because authentication failed when we execute "exportfs -au", then RECLAIM_COMPLETE will go a wrong way. After mount succeeds, all OPEN call will fail due to an NFS4ERR_GRACE error being returned. This patch is to fix it by resending a RPC request. Signed-off-by: Zhang Xianwei <[email protected]> Signed-off-by: Yi Wang <[email protected]> Fixes: aa5190d ("NFSv4: Kill nfs4_async_handle_error() abuses by NFSv4.1") Signed-off-by: Trond Myklebust <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
1 parent 281c6a4 commit 1e9fd95

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

fs/nfs/nfs4proc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9408,6 +9408,9 @@ static int nfs41_reclaim_complete_handle_errors(struct rpc_task *task, struct nf
94089408
rpc_delay(task, NFS4_POLL_RETRY_MAX);
94099409
fallthrough;
94109410
case -NFS4ERR_RETRY_UNCACHED_REP:
9411+
case -EACCES:
9412+
dprintk("%s: failed to reclaim complete error %d for server %s, retrying\n",
9413+
__func__, task->tk_status, clp->cl_hostname);
94119414
return -EAGAIN;
94129415
case -NFS4ERR_BADSESSION:
94139416
case -NFS4ERR_DEADSESSION:

0 commit comments

Comments
 (0)