summaryrefslogtreecommitdiff
path: root/fs/nfs/nfs4proc.c
diff options
context:
space:
mode:
authorAnna Schumaker <Anna.Schumaker@Netapp.com>2017-01-12 00:08:35 +0300
committerAnna Schumaker <Anna.Schumaker@Netapp.com>2017-01-30 21:14:50 +0300
commit37a8484aef09638b9eead7070cb0ee27adb74ceb (patch)
tree9b251e125f1b79cf2de1a2a8ccfcca2f458e7597 /fs/nfs/nfs4proc.c
parent820bf85ce249ec5b4da9f6aaefa3f5491b23b587 (diff)
downloadlinux-37a8484aef09638b9eead7070cb0ee27adb74ceb.tar.xz
NFS: Return errors directly in _nfs4_opendata_reclaim_to_nfs4_state()
There is no need for a goto just to return an error code without any cleanup. Returning the error directly helps to clean up the code. Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
Diffstat (limited to 'fs/nfs/nfs4proc.c')
-rw-r--r--fs/nfs/nfs4proc.c11
1 files changed, 3 insertions, 8 deletions
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c
index b577e172c95b..3e892b05e62b 100644
--- a/fs/nfs/nfs4proc.c
+++ b/fs/nfs/nfs4proc.c
@@ -1639,17 +1639,15 @@ _nfs4_opendata_reclaim_to_nfs4_state(struct nfs4_opendata *data)
int ret;
if (!data->rpc_done) {
- if (data->rpc_status) {
- ret = data->rpc_status;
- goto err;
- }
+ if (data->rpc_status)
+ return ERR_PTR(data->rpc_status);
/* cached opens have already been processed */
goto update;
}
ret = nfs_refresh_inode(inode, &data->f_attr);
if (ret)
- goto err;
+ return ERR_PTR(ret);
if (data->o_res.delegation_type != 0)
nfs4_opendata_check_deleg(data, state);
@@ -1659,9 +1657,6 @@ update:
atomic_inc(&state->count);
return state;
-err:
- return ERR_PTR(ret);
-
}
static struct nfs4_state *