diff options
| author | Christoph Hellwig <hch@infradead.org> | 2013-10-04 06:49:11 -0700 |
|---|---|---|
| committer | Mister Oyster <oysterized@gmail.com> | 2017-04-11 10:59:10 +0200 |
| commit | 4a6abf6d616af50e713a4765c14c0341c2ad9a5a (patch) | |
| tree | b9a594196bd69bc4c906992b6de8f0ab9d719402 /block | |
| parent | e1b09f0c9f45cd61133860a882357246d4645bac (diff) | |
block: remove request ref_count
This reference count has been around since before git history, but the only
place where it's used is in blk_execute_rq, and ther it is entirely useless
as it is incremented before submitting the request and decremented in the
end_io handler before waking up the submitter thread.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block')
| -rw-r--r-- | block/blk-core.c | 3 | ||||
| -rw-r--r-- | block/blk-exec.c | 7 |
2 files changed, 0 insertions, 10 deletions
diff --git a/block/blk-core.c b/block/blk-core.c index 502174051..24cbd1136 100644 --- a/block/blk-core.c +++ b/block/blk-core.c @@ -144,7 +144,6 @@ void blk_rq_init(struct request_queue *q, struct request *rq) rq->cmd = rq->__cmd; rq->cmd_len = BLK_MAX_CDB; rq->tag = -1; - rq->ref_count = 1; rq->start_time = jiffies; set_start_time_ns(rq); rq->part = NULL; @@ -1362,8 +1361,6 @@ void __blk_put_request(struct request_queue *q, struct request *req) { if (unlikely(!q)) return; - if (unlikely(--req->ref_count)) - return; blk_pm_put_request(req); diff --git a/block/blk-exec.c b/block/blk-exec.c index e70621396..7972da728 100644 --- a/block/blk-exec.c +++ b/block/blk-exec.c @@ -24,7 +24,6 @@ static void blk_end_sync_rq(struct request *rq, int error) struct completion *waiting = rq->end_io_data; rq->end_io_data = NULL; - __blk_put_request(rq->q, rq); /* * complete last, if this is a stack request the process (and thus @@ -103,12 +102,6 @@ int blk_execute_rq(struct request_queue *q, struct gendisk *bd_disk, int err = 0; unsigned long hang_check; - /* - * we need an extra reference to the request, so we can look at - * it after io completion - */ - rq->ref_count++; - if (!rq->sense) { memset(sense, 0, sizeof(sense)); rq->sense = sense; |
