aboutsummaryrefslogtreecommitdiffstats
path: root/block/compat_ioctl.c
diff options
context:
space:
mode:
authorAl Viro <al@aretha.pdmi.ras.ru>2008-09-19 03:17:36 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:49:14 -0400
commit56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (patch)
tree3e9b5877f77ce24a6d17574ff3d32ae8351fa0ef /block/compat_ioctl.c
parent6af3a56e1dd4d95836a47214e5c60d5b749a5501 (diff)
[PATCH] kill the rest of struct file propagation in block ioctls
Now we can switch blkdev_ioctl() block_device/mode Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'block/compat_ioctl.c')
-rw-r--r--block/compat_ioctl.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/block/compat_ioctl.c b/block/compat_ioctl.c
index 5b3db0640d87..3098c92402fd 100644
--- a/block/compat_ioctl.c
+++ b/block/compat_ioctl.c
@@ -177,7 +177,7 @@ struct compat_blkpg_ioctl_arg {
177 compat_caddr_t data; 177 compat_caddr_t data;
178}; 178};
179 179
180static int compat_blkpg_ioctl(struct inode *inode, struct file *file, 180static int compat_blkpg_ioctl(struct block_device *bdev, fmode_t mode,
181 unsigned int cmd, struct compat_blkpg_ioctl_arg __user *ua32) 181 unsigned int cmd, struct compat_blkpg_ioctl_arg __user *ua32)
182{ 182{
183 struct blkpg_ioctl_arg __user *a = compat_alloc_user_space(sizeof(*a)); 183 struct blkpg_ioctl_arg __user *a = compat_alloc_user_space(sizeof(*a));
@@ -196,7 +196,7 @@ static int compat_blkpg_ioctl(struct inode *inode, struct file *file,
196 if (err) 196 if (err)
197 return err; 197 return err;
198 198
199 return blkdev_ioctl(inode, file, cmd, (unsigned long)a); 199 return blkdev_ioctl(bdev, mode, cmd, (unsigned long)a);
200} 200}
201 201
202#define BLKBSZGET_32 _IOR(0x12, 112, int) 202#define BLKBSZGET_32 _IOR(0x12, 112, int)
@@ -715,13 +715,13 @@ long compat_blkdev_ioctl(struct file *file, unsigned cmd, unsigned long arg)
715 * but we call blkdev_ioctl, which gets the lock for us 715 * but we call blkdev_ioctl, which gets the lock for us
716 */ 716 */
717 case BLKRRPART: 717 case BLKRRPART:
718 return blkdev_ioctl(inode, file, cmd, 718 return blkdev_ioctl(bdev, mode, cmd,
719 (unsigned long)compat_ptr(arg)); 719 (unsigned long)compat_ptr(arg));
720 case BLKBSZSET_32: 720 case BLKBSZSET_32:
721 return blkdev_ioctl(inode, file, BLKBSZSET, 721 return blkdev_ioctl(bdev, mode, BLKBSZSET,
722 (unsigned long)compat_ptr(arg)); 722 (unsigned long)compat_ptr(arg));
723 case BLKPG: 723 case BLKPG:
724 return compat_blkpg_ioctl(inode, file, cmd, compat_ptr(arg)); 724 return compat_blkpg_ioctl(bdev, mode, cmd, compat_ptr(arg));
725 case BLKRAGET: 725 case BLKRAGET:
726 case BLKFRAGET: 726 case BLKFRAGET:
727 if (!arg) 727 if (!arg)