Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

NFSv4: Use error handler on failed GETATTR with successful OPEN

Place the call to resend the failed GETATTR under the error handler so that
when appropriate, the GETATTR is retried more than once.

The server can fail the GETATTR op in the OPEN compound with a recoverable
error such as NFS4ERR_DELAY. In the case of an O_EXCL open, the server has
created the file, so a retrans of the OPEN call will fail with NFS4ERR_EXIST.

Signed-off-by: Andy Adamson <andros@netapp.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>

authored by

Andy Adamson and committed by
Trond Myklebust
8935ef66 f868089b

+1 -1
+1 -1
fs/nfs/nfs4proc.c
··· 2027 2027 return status; 2028 2028 } 2029 2029 if (!(o_res->f_attr->valid & NFS_ATTR_FATTR)) 2030 - _nfs4_proc_getattr(server, &o_res->fh, o_res->f_attr, o_res->f_label); 2030 + nfs4_proc_getattr(server, &o_res->fh, o_res->f_attr, o_res->f_label); 2031 2031 return 0; 2032 2032 } 2033 2033