diff options
author | Christoph Hellwig <hch@lst.de> | 2020-05-27 07:24:19 +0200 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-05-27 05:21:23 -0600 |
commit | 524f9ffd6a4d3622aa48ca286ff85a30ed1cdbcf (patch) | |
tree | e04d89fd97ee32e1d7d66eaa881c0c035d1db0f4 /block/blk-merge.c | |
parent | b2d76adbc0828e0f108567973bcc500ed1abc139 (diff) | |
download | linux-524f9ffd6a4d3622aa48ca286ff85a30ed1cdbcf.tar.bz2 |
block: reduce part_stat_lock() scope
We only need the stats lock (aka preempt_disable()) for updating the
states, not for looking up or dropping the hd_struct reference.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Konstantin Khlebnikov <khlebnikov@yandex-team.ru>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index c3beae5c1be7..f0b0bae075a0 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -674,8 +674,9 @@ static void blk_account_io_merge_request(struct request *req) if (blk_do_io_stat(req)) { part_stat_lock(); part_stat_inc(req->part, merges[op_stat_group(req_op(req))]); - hd_struct_put(req->part); part_stat_unlock(); + + hd_struct_put(req->part); } } |