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

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
Loading
Loading
Loading
Loading
+33 −37
Original line number Diff line number Diff line
@@ -1617,16 +1617,12 @@ restart:
		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: