aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAl Viro2008-09-19 02:17:36 -0500
committerAl Viro2008-10-21 06:49:14 -0500
commit56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (patch)
tree3e9b5877f77ce24a6d17574ff3d32ae8351fa0ef /block/ioctl.c
parent6af3a56e1dd4d95836a47214e5c60d5b749a5501 (diff)
downloadkernel-common-56b26add02b4bdea81d5e0ebda60db1fe3311ad4.tar.gz
kernel-common-56b26add02b4bdea81d5e0ebda60db1fe3311ad4.tar.xz
kernel-common-56b26add02b4bdea81d5e0ebda60db1fe3311ad4.zip
[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/ioctl.c')
-rw-r--r--block/ioctl.c9
1 files changed, 1 insertions, 8 deletions
diff --git a/block/ioctl.c b/block/ioctl.c
index 14b7f2c1066..c832d639b6e 100644
--- a/block/ioctl.c
+++ b/block/ioctl.c
@@ -230,20 +230,13 @@ EXPORT_SYMBOL_GPL(__blkdev_driver_ioctl);
230 * always keep this in sync with compat_blkdev_ioctl() and 230 * always keep this in sync with compat_blkdev_ioctl() and
231 * compat_blkdev_locked_ioctl() 231 * compat_blkdev_locked_ioctl()
232 */ 232 */
233int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd, 233int blkdev_ioctl(struct block_device *bdev, fmode_t mode, unsigned cmd,
234 unsigned long arg) 234 unsigned long arg)
235{ 235{
236 struct block_device *bdev = inode->i_bdev;
237 struct gendisk *disk = bdev->bd_disk; 236 struct gendisk *disk = bdev->bd_disk;
238 struct backing_dev_info *bdi; 237 struct backing_dev_info *bdi;
239 loff_t size; 238 loff_t size;
240 int ret, n; 239 int ret, n;
241 fmode_t mode = 0;
242 if (file) {
243 mode = file->f_mode;
244 if (file->f_flags & O_NDELAY)
245 mode |= FMODE_NDELAY_NOW;
246 }
247 240
248 switch(cmd) { 241 switch(cmd) {
249 case BLKFLSBUF: 242 case BLKFLSBUF: