From 07affbb1eadddfbab8e2270ee17965419887d8a2 Mon Sep 17 00:00:00 2001 From: Alexander Viro Date: Sun, 27 Apr 2003 03:47:38 -0700 Subject: [PATCH] bdget_disk() New helper - bdget_disk(gendisk, partition) invalidate_device() replaced with invalidate_partition(disk, part) --- include/linux/fs.h | 2 +- include/linux/genhd.h | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'include/linux') diff --git a/include/linux/fs.h b/include/linux/fs.h index 26aa1bd539f1..572b92e6f443 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h @@ -1105,7 +1105,7 @@ extern int fs_may_remount_ro(struct super_block *); extern int check_disk_change(struct block_device *); extern int invalidate_inodes(struct super_block *); extern int __invalidate_device(struct block_device *, int); -extern int invalidate_device(kdev_t, int); +extern int invalidate_partition(struct gendisk *, int); unsigned long invalidate_mapping_pages(struct address_space *mapping, pgoff_t start, pgoff_t end); unsigned long invalidate_inode_pages(struct address_space *mapping); diff --git a/include/linux/genhd.h b/include/linux/genhd.h index 096643e667ae..35e93e35455d 100644 --- a/include/linux/genhd.h +++ b/include/linux/genhd.h @@ -367,6 +367,11 @@ extern void blk_register_region(dev_t dev, unsigned long range, void *data); extern void blk_unregister_region(dev_t dev, unsigned long range); +static inline struct block_device *bdget_disk(struct gendisk *disk, int index) +{ + return bdget(MKDEV(disk->major, disk->first_minor) + index); +} + #endif #endif -- cgit v1.2.3