aboutsummaryrefslogtreecommitdiffstats
path: root/block
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-07-15 15:21:45 -0400
committerBartlomiej Zolnierkiewicz <bzolnier@gmail.com>2008-07-15 15:21:45 -0400
commit52a93ba815737e3877f85b46850cffe993a22429 (patch)
treefcc2797c13884e70100d7c9939c39cc9b4658cc8 /block
parentd79c5a670ddf076a346ddcf3d9e21785ecab963f (diff)
block: remove the checking for NULL queue in blk_put_request
Some uses blk_put_request asymmetrically, that is, they uses it with requests that not allocated by blk_get_request. As a result, blk_put_request has a hack to catch a NULL request_queue. Now such callers are fixed (they use blk_get_request properly). So we can safely remove the hack in blk_put_request. Signed-off-by: FUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp> Cc: Borislav Petkov <petkovbb@gmail.com> Signed-off-by: Jens Axboe <jens.axboe@oracle.com> Signed-off-by: Bartlomiej Zolnierkiewicz <bzolnier@gmail.com>
Diffstat (limited to 'block')
-rw-r--r--block/blk-core.c12
1 files changed, 3 insertions, 9 deletions
diff --git a/block/blk-core.c b/block/blk-core.c
index 1905aaba49fb..ac83cf9a19ae 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1042,15 +1042,9 @@ void blk_put_request(struct request *req)
1042 unsigned long flags; 1042 unsigned long flags;
1043 struct request_queue *q = req->q; 1043 struct request_queue *q = req->q;
1044 1044
1045 /* 1045 spin_lock_irqsave(q->queue_lock, flags);
1046 * Gee, IDE calls in w/ NULL q. Fix IDE and remove the 1046 __blk_put_request(q, req);
1047 * following if (q) test. 1047 spin_unlock_irqrestore(q->queue_lock, flags);
1048 */
1049 if (q) {
1050 spin_lock_irqsave(q->queue_lock, flags);
1051 __blk_put_request(q, req);
1052 spin_unlock_irqrestore(q->queue_lock, flags);
1053 }
1054} 1048}
1055EXPORT_SYMBOL(blk_put_request); 1049EXPORT_SYMBOL(blk_put_request);
1056 1050