Commit 35a61606 authored by Anna Schumaker's avatar Anna Schumaker Committed by Trond Myklebust

NFS: Reduce indentation of the switch statement in nfs4_reclaim_open_state()

Most places in the kernel tend to line up cases with the switch to
reduce indentation, so move this over to match that style.
Additionally, I handle the (status >= 0) case in the switch so that we
only "goto restart" from a single place after error handling.
Signed-off-by: default avatarAnna Schumaker <Anna.Schumaker@Netapp.com>
Signed-off-by: default avatarTrond Myklebust <trond.myklebust@hammerspace.com>
parent cb7a8384
...@@ -1617,16 +1617,12 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs ...@@ -1617,16 +1617,12 @@ static int nfs4_reclaim_open_state(struct nfs4_state_owner *sp, const struct nfs
refcount_inc(&state->count); refcount_inc(&state->count);
spin_unlock(&sp->so_lock); spin_unlock(&sp->so_lock);
status = __nfs4_reclaim_open_state(sp, state, ops); status = __nfs4_reclaim_open_state(sp, state, ops);
if (status >= 0) {
nfs4_put_open_state(state);
spin_lock(&sp->so_lock);
goto restart;
}
switch (status) { switch (status) {
default: default:
printk(KERN_ERR "NFS: %s: unhandled error %d\n", if (status >= 0)
__func__, status); break;
printk(KERN_ERR "NFS: %s: unhandled error %d\n", __func__, status);
/* Fall through */ /* Fall through */
case -ENOENT: case -ENOENT:
case -ENOMEM: case -ENOMEM:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment