Skip to content

Commit 08f8585

Browse files
author
Al Viro
committed
[PATCH] move block_device_operations to blkdev.h
Signed-off-by: Al Viro <[email protected]>
1 parent 647b3d0 commit 08f8585

File tree

3 files changed

+19
-14
lines changed

3 files changed

+19
-14
lines changed

fs/ext2/xip.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@
1111
#include <linux/buffer_head.h>
1212
#include <linux/ext2_fs_sb.h>
1313
#include <linux/ext2_fs.h>
14+
#include <linux/blkdev.h>
1415
#include "ext2.h"
1516
#include "xip.h"
1617

include/linux/blkdev.h

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1057,6 +1057,23 @@ static inline int blk_integrity_rq(struct request *rq)
10571057

10581058
#endif /* CONFIG_BLK_DEV_INTEGRITY */
10591059

1060+
struct file;
1061+
struct inode;
1062+
1063+
struct 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+
10601077
#else /* CONFIG_BLOCK */
10611078
/*
10621079
* stubs for when the block layer is configured out

include/linux/fs.h

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1270,20 +1270,7 @@ int generic_osync_inode(struct inode *, struct address_space *, int);
12701270
* to have different dirent layouts depending on the binary type.
12711271
*/
12721272
typedef int (*filldir_t)(void *, const char *, int, loff_t, u64, unsigned);
1273-
1274-
struct 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-
};
1273+
struct block_device_operations;
12871274

12881275
/* These macros are for out of kernel modules to test that
12891276
* the kernel supports the unlocked_ioctl and compat_ioctl

0 commit comments

Comments
 (0)