Commit 70c6ea26 authored by Al Viro's avatar Al Viro Committed by Mike Marshall

orangefs: reduce nesting in wait_for_matching_downcall()

reorder if branches...
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent e1056a9c
......@@ -376,7 +376,19 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op)
}
spin_unlock(&op->lock);
if (!signal_pending(current)) {
if (unlikely(signal_pending(current))) {
gossip_debug(GOSSIP_WAIT_DEBUG,
"*** %s:"
" operation interrupted by a signal (tag "
"%llu, op %p)\n",
__func__,
llu(op->tag),
op);
orangefs_clean_up_interrupted_operation(op);
ret = -EINTR;
break;
}
/*
* if this was our first attempt and client-core
* has not purged our operation, we are happy to
......@@ -403,8 +415,7 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op)
op,
op->attempts);
ret = -ETIMEDOUT;
orangefs_clean_up_interrupted_operation
(op);
orangefs_clean_up_interrupted_operation(op);
break;
}
}
......@@ -436,19 +447,6 @@ static int wait_for_matching_downcall(struct orangefs_kernel_op_s *op)
break;
}
spin_unlock(&op->lock);
continue;
}
gossip_debug(GOSSIP_WAIT_DEBUG,
"*** %s:"
" operation interrupted by a signal (tag "
"%llu, op %p)\n",
__func__,
llu(op->tag),
op);
orangefs_clean_up_interrupted_operation(op);
ret = -EINTR;
break;
}
spin_lock(&op->lock);
......
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