aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:43:36 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:52 -0400
commit90b8f2824ce68dd87d304641a1d5a048dfff39f5 (patch)
treeb55ddcb619aac1e16d845dd6796c51721dd6ee56
parent40cc51be699e37b78102ce7b2196ec9c32fe1908 (diff)
[PATCH] end of methods switch: remove the old ones
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r--block/compat_ioctl.c12
-rw-r--r--block/ioctl.c26
-rw-r--r--fs/block_dev.c13
-rw-r--r--include/linux/blkdev.h8
4 files changed, 0 insertions, 59 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
index 576c4fd15463..fd537fdb25a3 100644
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -708,16 +708,6 @@ static int compat_blkdev_driver_ioctl(struct inode *inode, struct file *file,
708 return -ENOIOCTLCMD; 708 return -ENOIOCTLCMD;
709 } 709 }
710 710
711 if (disk->fops->__unlocked_ioctl)
712 return disk->fops->__unlocked_ioctl(file, cmd, arg);
713
714 if (disk->fops->__ioctl) {
715 lock_kernel();
716 ret = disk->fops->__ioctl(inode, file, cmd, arg);
717 unlock_kernel();
718 return ret;
719 }
720
721 return __blkdev_driver_ioctl(inode->i_bdev, file->f_mode, cmd, arg); 711 return __blkdev_driver_ioctl(inode->i_bdev, file->f_mode, cmd, arg);
722} 712}
723 713
@@ -805,8 +795,6 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
805 795
806 lock_kernel(); 796 lock_kernel();
807 ret = compat_blkdev_locked_ioctl(inode, file, bdev, cmd, arg); 797 ret = compat_blkdev_locked_ioctl(inode, file, bdev, cmd, arg);
808 if (ret == -ENOIOCTLCMD && disk->fops->__compat_ioctl)
809 ret = disk->fops->__compat_ioctl(file, cmd, arg);
810 unlock_kernel(); 798 unlock_kernel();
811 if (ret == -ENOIOCTLCMD && disk->fops->compat_ioctl) 799 if (ret == -ENOIOCTLCMD && disk->fops->compat_ioctl)
812 ret = disk->fops->compat_ioctl(bdev, file->f_mode, cmd, arg); 800 ret = disk->fops->compat_ioctl(bdev, file->f_mode, cmd, arg);
diff --git a/block/ioctl.c b/block/ioctl.c
index 01ff463bc801..0db89f95b15f 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -276,16 +276,6 @@ int blkdev_driver_ioctl(struct inode *inode, struct file *file,
276 mode |= FMODE_NDELAY_NOW; 276 mode |= FMODE_NDELAY_NOW;
277 } 277 }
278 278
279 if (disk->fops->__unlocked_ioctl)
280 return disk->fops->__unlocked_ioctl(file, cmd, arg);
281
282 if (disk->fops->__ioctl) {
283 lock_kernel();
284 ret = disk->fops->__ioctl(inode, file, cmd, arg);
285 unlock_kernel();
286 return ret;
287 }
288
289 return __blkdev_driver_ioctl(inode->i_bdev, mode, cmd, arg); 279 return __blkdev_driver_ioctl(inode->i_bdev, mode, cmd, arg);
290} 280}
291EXPORT_SYMBOL_GPL(blkdev_driver_ioctl); 281EXPORT_SYMBOL_GPL(blkdev_driver_ioctl);
@@ -295,22 +285,6 @@ int __blkdev_driver_ioctl(struct block_device *bdev, fmode_t mode,
295{ 285{
296 struct gendisk *disk = bdev->bd_disk; 286 struct gendisk *disk = bdev->bd_disk;
297 int ret; 287 int ret;
298 /* you bet it'll go away by the end of patch series */
299 struct file fake_file = {};
300 struct dentry fake_dentry = {};
301 fake_file.f_mode = mode;
302 fake_file.f_path.dentry = &fake_dentry;
303 fake_dentry.d_inode = bdev->bd_inode;
304
305 if (disk->fops->__unlocked_ioctl)
306 return disk->fops->__unlocked_ioctl(&fake_file, cmd, arg);
307
308 if (disk->fops->__ioctl) {
309 lock_kernel();
310 ret = disk->fops->__ioctl(bdev->bd_inode, &fake_file, cmd, arg);
311 unlock_kernel();
312 return ret;
313 }
314 288
315 if (disk->fops->ioctl) 289 if (disk->fops->ioctl)
316 return disk->fops->ioctl(bdev, mode, cmd, arg); 290 return disk->fops->ioctl(bdev, mode, cmd, arg);
diff --git a/fs/block_dev.c b/fs/block_dev.c
index 73b6ce47c861..55124ac8c7ad 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -1033,11 +1033,6 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
1033 bdev->bd_contains = bdev; 1033 bdev->bd_contains = bdev;
1034 if (!partno) { 1034 if (!partno) {
1035 struct backing_dev_info *bdi; 1035 struct backing_dev_info *bdi;
1036 if (disk->fops->__open) {
1037 ret = disk->fops->__open(bdev->bd_inode, file);
1038 if (ret)
1039 goto out_first;
1040 }
1041 if (disk->fops->open) { 1036 if (disk->fops->open) {
1042 ret = disk->fops->open(bdev, file->f_mode); 1037 ret = disk->fops->open(bdev, file->f_mode);
1043 if (ret) 1038 if (ret)
@@ -1079,11 +1074,6 @@ static int do_open(struct block_device *bdev, struct file *file, int for_part)
1079 part = NULL; 1074 part = NULL;
1080 disk = NULL; 1075 disk = NULL;
1081 if (bdev->bd_contains == bdev) { 1076 if (bdev->bd_contains == bdev) {
1082 if (bdev->bd_disk->fops->__open) {
1083 ret = bdev->bd_disk->fops->__open(bdev->bd_inode, file);
1084 if (ret)
1085 goto out;
1086 }
1087 if (bdev->bd_disk->fops->open) { 1077 if (bdev->bd_disk->fops->open) {
1088 ret = bdev->bd_disk->fops->open(bdev, file->f_mode); 1078 ret = bdev->bd_disk->fops->open(bdev, file->f_mode);
1089 if (ret) 1079 if (ret)
@@ -1180,7 +1170,6 @@ static int blkdev_open(struct inode * inode, struct file * filp)
1180static int __blkdev_put(struct block_device *bdev, int for_part) 1170static int __blkdev_put(struct block_device *bdev, int for_part)
1181{ 1171{
1182 int ret = 0; 1172 int ret = 0;
1183 struct inode *bd_inode = bdev->bd_inode;
1184 struct gendisk *disk = bdev->bd_disk; 1173 struct gendisk *disk = bdev->bd_disk;
1185 struct block_device *victim = NULL; 1174 struct block_device *victim = NULL;
1186 1175
@@ -1194,8 +1183,6 @@ static int __blkdev_put(struct block_device *bdev, int for_part)
1194 kill_bdev(bdev); 1183 kill_bdev(bdev);
1195 } 1184 }
1196 if (bdev->bd_contains == bdev) { 1185 if (bdev->bd_contains == bdev) {
1197 if (disk->fops->__release)
1198 ret = disk->fops->__release(bd_inode, NULL);
1199 if (disk->fops->release) 1186 if (disk->fops->release)
1200 ret = disk->fops->release(disk, 0); 1187 ret = disk->fops->release(disk, 0);
1201 } 1188 }
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h
index b573186ff1a1..a135256b272c 100644
--- a/include/linux/blkdev.h
+++ b/include/linux/blkdev.h
@@ -1057,15 +1057,7 @@ 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 { 1060struct 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 (*open) (struct block_device *, fmode_t); 1061 int (*open) (struct block_device *, fmode_t);
1070 int (*release) (struct gendisk *, fmode_t); 1062 int (*release) (struct gendisk *, fmode_t);
1071 int (*locked_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long); 1063 int (*locked_ioctl) (struct block_device *, fmode_t, unsigned, unsigned long);