Преглед изворни кода

NFS: Retry the CLOSE if the embedded GETATTR is rejected with EACCES

If our CLOSE RPC call is rejected with an EACCES call, then we should
remove the GETATTR call from the compound RPC and retry.
This could potentially happen when there is a conflict between an
ACL denying attribute reads and our use of SP4_MACH_CRED.

Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Trond Myklebust пре 8 година
родитељ
комит
f07d4a31cc
1 измењених фајлова са 10 додато и 0 уклоњено
  1. 10 0
      fs/nfs/nfs4proc.c

+ 10 - 0
fs/nfs/nfs4proc.c

@@ -3122,6 +3122,16 @@ static void nfs4_close_done(struct rpc_task *task, void *data)
 			res_stateid = &calldata->res.stateid;
 			res_stateid = &calldata->res.stateid;
 			renew_lease(server, calldata->timestamp);
 			renew_lease(server, calldata->timestamp);
 			break;
 			break;
+		case -NFS4ERR_ACCESS:
+			if (calldata->arg.bitmask != NULL) {
+				calldata->arg.bitmask = NULL;
+				calldata->res.fattr = NULL;
+				task->tk_status = 0;
+				rpc_restart_call_prepare(task);
+				goto out_release;
+
+			}
+			break;
 		case -NFS4ERR_ADMIN_REVOKED:
 		case -NFS4ERR_ADMIN_REVOKED:
 		case -NFS4ERR_STALE_STATEID:
 		case -NFS4ERR_STALE_STATEID:
 		case -NFS4ERR_EXPIRED:
 		case -NFS4ERR_EXPIRED: