summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2016-01-23 21:27:50 +0300
committerMike Marshall <hubcap@omnibond.com>2016-01-23 23:20:11 +0300
commit4f55e39732ad0bd05d70c88e174e747d55e3685c (patch)
treed988495bb4f101c3b04485bc714dddc6102b5dff
parent727cbfea623b78d46ce8e0f8c931b5189f3fe2e0 (diff)
downloadlinux-4f55e39732ad0bd05d70c88e174e747d55e3685c.tar.xz
if ORANGEFS_VFS_OP_FILE_IO request had been given up, don't bother waiting
... we are not going to get woken up anyway, so it's just going to time out and whine. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Mike Marshall <hubcap@omnibond.com>
-rw-r--r--fs/orangefs/devorangefs-req.c32
1 files changed, 16 insertions, 16 deletions
diff --git a/fs/orangefs/devorangefs-req.c b/fs/orangefs/devorangefs-req.c
index d8c436a0aa1b..3879f2b7cf29 100644
--- a/fs/orangefs/devorangefs-req.c
+++ b/fs/orangefs/devorangefs-req.c
@@ -418,8 +418,11 @@ wakeup:
* that this op is done
*/
spin_lock(&op->lock);
- if (!op_state_given_up(op))
- set_op_state_serviced(op);
+ if (unlikely(op_state_given_up(op))) {
+ spin_unlock(&op->lock);
+ goto out;
+ }
+ set_op_state_serviced(op);
spin_unlock(&op->lock);
while (1) {
@@ -433,22 +436,19 @@ wakeup:
break;
}
spin_unlock(&op->lock);
-
- if (!signal_pending(current)) {
- int timeout = op_timeout_secs * HZ;
- if (!schedule_timeout(timeout)) {
- gossip_debug(GOSSIP_DEV_DEBUG,
- "%s: timed out.\n",
- __func__);
- break;
- }
- continue;
+ if (unlikely(signal_pending(current))) {
+ gossip_debug(GOSSIP_DEV_DEBUG,
+ "%s: signal on I/O wait, aborting\n",
+ __func__);
+ break;
}
- gossip_debug(GOSSIP_DEV_DEBUG,
- "%s: signal on I/O wait, aborting\n",
- __func__);
- break;
+ if (!schedule_timeout(op_timeout_secs * HZ)) {
+ gossip_debug(GOSSIP_DEV_DEBUG,
+ "%s: timed out.\n",
+ __func__);
+ break;
+ }
}
spin_lock(&op->lock);