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
refcount_inc(&state->count);
spin_unlock(&sp->so_lock);
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) {
default:
printk(KERN_ERR "NFS: %s: unhandled error %d\n",
__func__, status);
if (status >= 0)
break;
printk(KERN_ERR "NFS: %s: unhandled error %d\n", __func__, status);
/* Fall through */
case -ENOENT:
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