aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChetan Loke <[email protected]>2012-07-31 08:47:13 +0200
committerJens Axboe <[email protected]>2012-07-31 08:47:13 +0200
commit01ff5dbc0925d11c8ad76eed3bdd02d0c7e1e0f5 (patch)
tree962e8fd1136191e31502dbe5e136b6900a3b2012
parent72ea1f74fcdf874cca6d2c0962379523bbd99e2c (diff)
block/nbd: micro-optimization in nbd request completion
Add in-flight cmds to the tail. That way while searching (during request completion),we will always get a hit on the first element. Signed-off-by: Chetan Loke <[email protected]> Acked-by: [email protected] Signed-off-by: Jens Axboe <[email protected]>
-rw-r--r--drivers/block/nbd.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/block/nbd.c b/drivers/block/nbd.c
index 061427a75d37..8957b9f0cfad 100644
--- a/drivers/block/nbd.c
+++ b/drivers/block/nbd.c
@@ -481,7 +481,7 @@ static void nbd_handle_req(struct nbd_device *nbd, struct request *req)
nbd_end_request(req);
} else {
spin_lock(&nbd->queue_lock);
- list_add(&req->queuelist, &nbd->queue_head);
+ list_add_tail(&req->queuelist, &nbd->queue_head);
spin_unlock(&nbd->queue_lock);
}