summaryrefslogtreecommitdiff
path: root/block
diff options
context:
space:
mode:
authorFUJITA Tomonori <fujita.tomonori@lab.ntt.co.jp>2008-05-13 11:09:53 +1000
committerStephen Rothwell <sfr@canb.auug.org.au>2008-05-13 11:09:53 +1000
commit683d882a3f48753c77099b436572919539db5811 (patch)
tree1b77130a45863c42de8c6c0f96dc47f3d7951dd2 /block
parentff3e10408aa012c7d3f632cb75ea4d071c4c3a9b (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 b754a4a2f9bd..9944647f19d4 100644
--- a/block/blk-core.c
+++ b/block/blk-core.c
@@ -1043,15 +1043,9 @@ void blk_put_request(struct request *req)
unsigned long flags;
struct request_queue *q = req->q;
- /*
- * Gee, IDE calls in w/ NULL q. Fix IDE and remove the
- * following if (q) test.
- */
- if (q) {
- spin_lock_irqsave(q->queue_lock, flags);
- __blk_put_request(q, req);
- spin_unlock_irqrestore(q->queue_lock, flags);
- }
+ spin_lock_irqsave(q->queue_lock, flags);
+ __blk_put_request(q, req);
+ spin_unlock_irqrestore(q->queue_lock, flags);
}
EXPORT_SYMBOL(blk_put_request);