diff options
author | Christoph Hellwig <hch@lst.de> | 2020-11-24 09:34:00 +0100 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2020-12-01 14:53:40 -0700 |
commit | 15e3d2c5cd53298272e59ad9072d3468f9dd3781 (patch) | |
tree | e526446b6b09c036e9aed966dbe2bdd252f5bb98 /block/partitions | |
parent | a782483cc1f875355690625d8253a232f2581418 (diff) | |
download | linux-15e3d2c5cd53298272e59ad9072d3468f9dd3781.tar.bz2 |
block: move disk stat accounting to struct block_device
Move the dkstats and stamp field to struct block_device in preparation
of killing struct 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/partitions')
-rw-r--r-- | block/partitions/core.c | 9 |
1 files changed, 1 insertions, 8 deletions
diff --git a/block/partitions/core.c b/block/partitions/core.c index bcfa8215bd5e..8924e1ea8b2a 100644 --- a/block/partitions/core.c +++ b/block/partitions/core.c @@ -409,14 +409,9 @@ static struct hd_struct *add_partition(struct gendisk *disk, int partno, if (!p) return ERR_PTR(-EBUSY); - err = -ENOMEM; - p->dkstats = alloc_percpu(struct disk_stats); - if (!p->dkstats) - goto out_free; - bdev = bdev_alloc(disk, partno); if (!bdev) - goto out_free_stats; + goto out_free; p->bdev = bdev; pdev = part_to_dev(p); @@ -490,8 +485,6 @@ out_free_info: kfree(p->info); out_bdput: bdput(bdev); -out_free_stats: - free_percpu(p->dkstats); out_free: kfree(p); return ERR_PTR(err); |