wrapper for access to ->bd_partno
On the next step it's going to get folded into a field where flags will go. Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
This commit is contained in:
@@ -720,6 +720,11 @@ void invalidate_disk(struct gendisk *disk);
|
||||
void set_disk_ro(struct gendisk *disk, bool read_only);
|
||||
void disk_uevent(struct gendisk *disk, enum kobject_action action);
|
||||
|
||||
static inline u8 bdev_partno(const struct block_device *bdev)
|
||||
{
|
||||
return bdev->bd_partno;
|
||||
}
|
||||
|
||||
static inline int get_disk_ro(struct gendisk *disk)
|
||||
{
|
||||
return disk->part0->bd_read_only ||
|
||||
@@ -1095,7 +1100,7 @@ static inline int sb_issue_zeroout(struct super_block *sb, sector_t block,
|
||||
|
||||
static inline bool bdev_is_partition(struct block_device *bdev)
|
||||
{
|
||||
return bdev->bd_partno;
|
||||
return bdev_partno(bdev) != 0;
|
||||
}
|
||||
|
||||
enum blk_default_limits {
|
||||
|
||||
Reference in New Issue
Block a user