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

Commit 4f55e397 authored by Al Viro's avatar Al Viro Committed by Mike Marshall
Browse files

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: default avatarAl Viro <viro@zeniv.linux.org.uk>
Signed-off-by: default avatarMike Marshall <hubcap@omnibond.com>
parent 727cbfea
Loading
Loading
Loading
Loading
+16 −16
Original line number Diff line number Diff line
@@ -418,7 +418,10 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
		 * that this op is done
		 */
		spin_lock(&op->lock);
		if (!op_state_given_up(op))
		if (unlikely(op_state_given_up(op))) {
			spin_unlock(&op->lock);
			goto out;
		}
		set_op_state_serviced(op);
		spin_unlock(&op->lock);

@@ -433,23 +436,20 @@ static ssize_t orangefs_devreq_write_iter(struct kiocb *iocb,
				break;
			}
			spin_unlock(&op->lock);

			if (!signal_pending(current)) {
				int timeout = op_timeout_secs * HZ;
				if (!schedule_timeout(timeout)) {
			if (unlikely(signal_pending(current))) {
				gossip_debug(GOSSIP_DEV_DEBUG,
						"%s: timed out.\n",
					"%s: signal on I/O wait, aborting\n",
					__func__);
				break;
			}
				continue;
			}

			if (!schedule_timeout(op_timeout_secs * HZ)) {
				gossip_debug(GOSSIP_DEV_DEBUG,
				"%s: signal on I/O wait, aborting\n",
					"%s: timed out.\n",
					__func__);
				break;
			}
		}

		spin_lock(&op->lock);
		finish_wait(&op->io_completion_waitq, &wait_entry);