NFSv4: Use error handler on failed GETATTR with successful OPEN
authorAndy Adamson <andros@netapp.com>
Fri, 23 May 2014 13:22:59 +0000 (06:22 -0700)
committerTrond Myklebust <trond.myklebust@primarydata.com>
Thu, 29 May 2014 20:46:03 +0000 (16:46 -0400)
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>
fs/nfs/nfs4proc.c

index 44fb93a66d26559a9e398cf6695f5bda168dff33..68dd81e5b58a9a8d069b1f705a10b840c5bb1acb 100644 (file)
@@ -2027,7 +2027,7 @@ static int _nfs4_proc_open(struct nfs4_opendata *data)
                        return status;
        }
        if (!(o_res->f_attr->valid & NFS_ATTR_FATTR))
-               _nfs4_proc_getattr(server, &o_res->fh, o_res->f_attr, o_res->f_label);
+               nfs4_proc_getattr(server, &o_res->fh, o_res->f_attr, o_res->f_label);
        return 0;
 }