diff options
Diffstat (limited to 'include/linux/fs.h')
-rw-r--r-- | include/linux/fs.h | 26 |
1 files changed, 14 insertions, 12 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index c0701288d204..3984f2358d1f 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -664,8 +664,9 @@ struct block_device { | |||
664 | void * bd_claiming; | 664 | void * bd_claiming; |
665 | void * bd_holder; | 665 | void * bd_holder; |
666 | int bd_holders; | 666 | int bd_holders; |
667 | bool bd_write_holder; | ||
667 | #ifdef CONFIG_SYSFS | 668 | #ifdef CONFIG_SYSFS |
668 | struct list_head bd_holder_list; | 669 | struct gendisk * bd_holder_disk; /* for sysfs slave linkng */ |
669 | #endif | 670 | #endif |
670 | struct block_device * bd_contains; | 671 | struct block_device * bd_contains; |
671 | unsigned bd_block_size; | 672 | unsigned bd_block_size; |
@@ -2019,7 +2020,6 @@ extern struct block_device *bdgrab(struct block_device *bdev); | |||
2019 | extern void bd_set_size(struct block_device *, loff_t size); | 2020 | extern void bd_set_size(struct block_device *, loff_t size); |
2020 | extern void bd_forget(struct inode *inode); | 2021 | extern void bd_forget(struct inode *inode); |
2021 | extern void bdput(struct block_device *); | 2022 | extern void bdput(struct block_device *); |
2022 | extern struct block_device *open_by_devnum(dev_t, fmode_t); | ||
2023 | extern void invalidate_bdev(struct block_device *); | 2023 | extern void invalidate_bdev(struct block_device *); |
2024 | extern int sync_blockdev(struct block_device *bdev); | 2024 | extern int sync_blockdev(struct block_device *bdev); |
2025 | extern struct super_block *freeze_bdev(struct block_device *); | 2025 | extern struct super_block *freeze_bdev(struct block_device *); |
@@ -2050,16 +2050,20 @@ extern const struct file_operations def_fifo_fops; | |||
2050 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); | 2050 | extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long); |
2051 | extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long); | 2051 | extern int blkdev_ioctl(struct block_device *, fmode_t, unsigned, unsigned long); |
2052 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); | 2052 | extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long); |
2053 | extern int blkdev_get(struct block_device *, fmode_t); | 2053 | extern int blkdev_get(struct block_device *bdev, fmode_t mode, void *holder); |
2054 | extern int blkdev_put(struct block_device *, fmode_t); | 2054 | extern struct block_device *blkdev_get_by_path(const char *path, fmode_t mode, |
2055 | extern int bd_claim(struct block_device *, void *); | 2055 | void *holder); |
2056 | extern void bd_release(struct block_device *); | 2056 | extern struct block_device *blkdev_get_by_dev(dev_t dev, fmode_t mode, |
2057 | void *holder); | ||
2058 | extern int blkdev_put(struct block_device *bdev, fmode_t mode); | ||
2057 | #ifdef CONFIG_SYSFS | 2059 | #ifdef CONFIG_SYSFS |
2058 | extern int bd_claim_by_disk(struct block_device *, void *, struct gendisk *); | 2060 | extern int bd_link_disk_holder(struct block_device *bdev, struct gendisk *disk); |
2059 | extern void bd_release_from_disk(struct block_device *, struct gendisk *); | ||
2060 | #else | 2061 | #else |
2061 | #define bd_claim_by_disk(bdev, holder, disk) bd_claim(bdev, holder) | 2062 | static inline int bd_link_disk_holder(struct block_device *bdev, |
2062 | #define bd_release_from_disk(bdev, disk) bd_release(bdev) | 2063 | struct gendisk *disk) |
2064 | { | ||
2065 | return 0; | ||
2066 | } | ||
2063 | #endif | 2067 | #endif |
2064 | #endif | 2068 | #endif |
2065 | 2069 | ||
@@ -2095,8 +2099,6 @@ static inline void unregister_chrdev(unsigned int major, const char *name) | |||
2095 | extern const char *__bdevname(dev_t, char *buffer); | 2099 | extern const char *__bdevname(dev_t, char *buffer); |
2096 | extern const char *bdevname(struct block_device *bdev, char *buffer); | 2100 | extern const char *bdevname(struct block_device *bdev, char *buffer); |
2097 | extern struct block_device *lookup_bdev(const char *); | 2101 | extern struct block_device *lookup_bdev(const char *); |
2098 | extern struct block_device *open_bdev_exclusive(const char *, fmode_t, void *); | ||
2099 | extern void close_bdev_exclusive(struct block_device *, fmode_t); | ||
2100 | extern void blkdev_show(struct seq_file *,off_t); | 2102 | extern void blkdev_show(struct seq_file *,off_t); |
2101 | 2103 | ||
2102 | #else | 2104 | #else |