diff options
| author | Alexander Viro <viro@parcelfarce.linux.theplanet.co.uk> | 2003-04-27 03:47:38 -0700 |
|---|---|---|
| committer | Linus Torvalds <torvalds@home.transmeta.com> | 2003-04-27 03:47:38 -0700 |
| commit | 07affbb1eadddfbab8e2270ee17965419887d8a2 (patch) | |
| tree | a1f506bc3939d605fc1f3017610c3cbefe999624 /include/linux | |
| parent | 5e3ecdac24a4311ee8fa5c2203165e2bec8907e1 (diff) | |
[PATCH] bdget_disk()
New helper - bdget_disk(gendisk, partition)
invalidate_device() replaced with invalidate_partition(disk, part)
Diffstat (limited to 'include/linux')
| -rw-r--r-- | include/linux/fs.h | 2 | ||||
| -rw-r--r-- | include/linux/genhd.h | 5 |
2 files changed, 6 insertions, 1 deletions
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 |
