diff options
author | Joe Perches <joe@perches.com> | 2014-07-23 09:13:12 +1000 |
---|---|---|
committer | Stephen Rothwell <sfr@canb.auug.org.au> | 2014-07-30 20:21:13 +1000 |
commit | 78745076f10bf85ee09b6e1a1bf756fbf1f4ec98 (patch) | |
tree | 503b80e5c2ba51ed438afa44a37f4701a37aa615 | |
parent | b5f82db923048e94599a3c7b210289dea5c078e9 (diff) |
dlm: plock: reduce indentation by rearranging order
if blocks that have a goto at the end of one branch can be
simplified by reordering and unindenting.
Signed-off-by: Joe Perches <joe@perches.com>
Cc: Al Viro <viro@ZenIV.linux.org.uk>
Cc: David Teigland <teigland@redhat.com>
Cc: Jeff Layton <jlayton@poochiereds.net>
Cc: Christine Caulfield <ccaulfie@redhat.com>
Cc: "J. Bruce Fields" <bfields@fieldses.org>
Cc: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
-rw-r--r-- | fs/dlm/plock.c | 26 |
1 files changed, 13 insertions, 13 deletions
diff --git a/fs/dlm/plock.c b/fs/dlm/plock.c index e0ab3a93eeff..3e0b6fcb0d2b 100644 --- a/fs/dlm/plock.c +++ b/fs/dlm/plock.c @@ -144,23 +144,23 @@ int dlm_posix_lock(dlm_lockspace_t *lockspace, u64 number, struct file *file, send_op(op); - if (xop->callback == NULL) { - rv = wait_event_killable(recv_wq, (op->done != 0)); - if (rv == -ERESTARTSYS) { - log_debug(ls, "dlm_posix_lock: wait killed %llx", - (unsigned long long)number); - spin_lock(&ops_lock); - list_del(&op->list); - spin_unlock(&ops_lock); - kfree(xop); - do_unlock_close(ls, number, file, fl); - goto out; - } - } else { + if (xop->callback) { rv = FILE_LOCK_DEFERRED; goto out; } + rv = wait_event_killable(recv_wq, (op->done != 0)); + if (rv == -ERESTARTSYS) { + log_debug(ls, "dlm_posix_lock: wait killed %llx", + (unsigned long long)number); + spin_lock(&ops_lock); + list_del(&op->list); + spin_unlock(&ops_lock); + kfree(xop); + do_unlock_close(ls, number, file, fl); + goto out; + } + spin_lock(&ops_lock); if (!list_empty(&op->list)) { log_error(ls, "dlm_posix_lock: op on list %llx", |