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

Commit e5eab017 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Jens Axboe
Browse files

nbd: complete requests from ->timeout



By completing the request entirely in the driver we can remove the
BLK_EH_HANDLED return value and thus the split responsibility between the
driver and the block layer that has been causing trouble.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarHannes Reinecke <hare@suse.com>
Signed-off-by: default avatarJens Axboe <axboe@kernel.dk>
parent db8c48e4
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -304,7 +304,7 @@ static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req,

	if (!refcount_inc_not_zero(&nbd->config_refs)) {
		cmd->status = BLK_STS_TIMEOUT;
		return BLK_EH_HANDLED;
		goto done;
	}
	config = nbd->config;

@@ -342,8 +342,9 @@ static enum blk_eh_timer_return nbd_xmit_timeout(struct request *req,
	cmd->status = BLK_STS_IOERR;
	sock_shutdown(nbd);
	nbd_config_put(nbd);

	return BLK_EH_HANDLED;
done:
	blk_mq_complete_request(req);
	return BLK_EH_DONE;
}

/*