diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-26 18:47:17 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-01 14:53:40 -0700 |
commit | cb8432d650fe3be58bb962bc8e602dc405510327 (patch) | |
tree | 5e893d44ba2449080db89f00098f11259384a56a /block/blk-merge.c | |
parent | 83950d359010a493462d58c712b1124c877d1b3b (diff) | |
download | linux-cb8432d650fe3be58bb962bc8e602dc405510327.tar.gz linux-cb8432d650fe3be58bb962bc8e602dc405510327.tar.bz2 linux-cb8432d650fe3be58bb962bc8e602dc405510327.zip |
block: allocate struct hd_struct as part of struct bdev_inode
Allocate hd_struct together with struct block_device to pre-load
the lifetime rule changes in preparation of merging the two structures.
Note that part0 was previously embedded into struct gendisk, but is
a separate allocation now, and already points to the block_device instead
of the hd_struct. The lifetime of struct gendisk is still controlled by
the struct device embedded in the part0 hd_struct.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Jan Kara <jack@suse.cz>
Reviewed-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'block/blk-merge.c')
-rw-r--r-- | block/blk-merge.c | 2 |
1 files changed, 0 insertions, 2 deletions
diff --git a/block/blk-merge.c b/block/blk-merge.c index bcf5e4580603..cb351ab9b77d 100644 --- a/block/blk-merge.c +++ b/block/blk-merge.c @@ -683,8 +683,6 @@ static void blk_account_io_merge_request(struct request *req) part_stat_lock(); part_stat_inc(req->part, merges[op_stat_group(req_op(req))]); part_stat_unlock(); - - hd_struct_put(req->part); } } |