Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

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

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
Loading
Loading
Loading
Loading
+58 −60
Original line number Diff line number Diff line
@@ -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);