提交 4f55e397 编写于 作者: A Al Viro 提交者: Mike Marshall

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: NAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: NMike Marshall <hubcap@omnibond.com>
上级 727cbfea
...@@ -418,8 +418,11 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, ...@@ -418,8 +418,11 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
* that this op is done * that this op is done
*/ */
spin_lock(&op->lock); spin_lock(&op->lock);
if (!op_state_given_up(op)) if (unlikely(op_state_given_up(op))) {
set_op_state_serviced(op); spin_unlock(&op->lock);
goto out;
}
set_op_state_serviced(op);
spin_unlock(&op->lock); spin_unlock(&op->lock);
while (1) { while (1) {
...@@ -433,22 +436,19 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb, ...@@ -433,22 +436,19 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
break; break;
} }
spin_unlock(&op->lock); spin_unlock(&op->lock);
if (unlikely(signal_pending(current))) {
if (!signal_pending(current)) { gossip_debug(GOSSIP_DEV_DEBUG,
int timeout = op_timeout_secs * HZ; "%s: signal on I/O wait, aborting\n",
if (!schedule_timeout(timeout)) { __func__);
gossip_debug(GOSSIP_DEV_DEBUG, break;
"%s: timed out.\n",
__func__);
break;
}
continue;
} }
gossip_debug(GOSSIP_DEV_DEBUG, if (!schedule_timeout(op_timeout_secs * HZ)) {
"%s: signal on I/O wait, aborting\n", gossip_debug(GOSSIP_DEV_DEBUG,
__func__); "%s: timed out.\n",
break; __func__);
break;
}
} }
spin_lock(&op->lock); spin_lock(&op->lock);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册