mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-24 21:54:34 -04:00
block: move capacity from disk to part0
Move disk->capacity to part0->nr_sects and convert all users who
directly accessed the field to use {get|set}_capacity(). This is done
early to allow the __dev field to be moved.
Signed-off-by: Tejun Heo <tj@kernel.org>
Signed-off-by: Jens Axboe <jens.axboe@oracle.com>
This commit is contained in:
parent
b5d0b9df0b
commit
80795aefb7
5 changed files with 7 additions and 8 deletions
|
|
@ -138,7 +138,6 @@ struct gendisk {
|
|||
struct block_device_operations *fops;
|
||||
struct request_queue *queue;
|
||||
void *private_data;
|
||||
sector_t capacity;
|
||||
|
||||
int flags;
|
||||
struct device *driverfs_dev; // FIXME: remove
|
||||
|
|
@ -411,11 +410,11 @@ static inline sector_t get_start_sect(struct block_device *bdev)
|
|||
}
|
||||
static inline sector_t get_capacity(struct gendisk *disk)
|
||||
{
|
||||
return disk->capacity;
|
||||
return disk->part0.nr_sects;
|
||||
}
|
||||
static inline void set_capacity(struct gendisk *disk, sector_t size)
|
||||
{
|
||||
disk->capacity = size;
|
||||
disk->part0.nr_sects = size;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_SOLARIS_X86_PARTITION
|
||||
|
|
|
|||
Loading…
Reference in a new issue