aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/linux/blkdev.h17
-rw-r--r--include/linux/fs.h15
2 files changed, 18 insertions, 14 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index 48f41b991adb..48ec8862a11a 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1057,6 +1057,23 @@ static inline int blk_integrity_rq(struct request *rq)
1057 1057
1058#endif /* CONFIG_BLK_DEV_INTEGRITY */ 1058#endif /* CONFIG_BLK_DEV_INTEGRITY */
1059 1059
1060struct file;
1061struct inode;
1062
1063struct block_device_operations {
1064 int (*open) (struct inode *, struct file *);
1065 int (*release) (struct inode *, struct file *);
1066 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
1067 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
1068 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
1069 int (*direct_access) (struct block_device *, sector_t,
1070 void **, unsigned long *);
1071 int (*media_changed) (struct gendisk *);
1072 int (*revalidate_disk) (struct gendisk *);
1073 int (*getgeo)(struct block_device *, struct hd_geometry *);
1074 struct module *owner;
1075};
1076
1060#else /* CONFIG_BLOCK */ 1077#else /* CONFIG_BLOCK */
1061/* 1078/*
1062 * stubs for when the block layer is configured out 1079 * stubs for when the block layer is configured out
diff --git a/include/linux/fs.h b/include/linux/fs.h
index 5ab5579a5162..58bbf689fef7 100644
--- a/include/linux/fs.h
+++ b/include/linux/fs.h
@@ -1270,20 +1270,7 @@ int generic_osync_inode(struct inode *, struct address_space *, int);
1270 * to have different dirent layouts depending on the binary type. 1270 * to have different dirent layouts depending on the binary type.
1271 */ 1271 */
1272typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned); 1272typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
1273 1273struct block_device_operations;
1274struct block_device_operations {
1275 int (*open) (struct inode *, struct file *);
1276 int (*release) (struct inode *, struct file *);
1277 int (*ioctl) (struct inode *, struct file *, unsigned, unsigned long);
1278 long (*unlocked_ioctl) (struct file *, unsigned, unsigned long);
1279 long (*compat_ioctl) (struct file *, unsigned, unsigned long);
1280 int (*direct_access) (struct block_device *, sector_t,
1281 void **, unsigned long *);
1282 int (*media_changed) (struct gendisk *);
1283 int (*revalidate_disk) (struct gendisk *);
1284 int (*getgeo)(struct block_device *, struct hd_geometry *);
1285 struct module *owner;
1286};
1287 1274
1288/* These macros are for out of kernel modules to test that 1275/* These macros are for out of kernel modules to test that
1289 * the kernel supports the unlocked_ioctl and compat_ioctl 1276 * the kernel supports the unlocked_ioctl and compat_ioctl