Merge git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev
* git://git.kernel.org/pub/scm/linux/kernel/git/viro/bdev: (66 commits) [PATCH] kill the rest of struct file propagation in block ioctls [PATCH] get rid of struct file use in blkdev_ioctl() BLKBSZSET [PATCH] get rid of blkdev_locked_ioctl() [PATCH] get rid of blkdev_driver_ioctl() [PATCH] sanitize blkdev_get() and friends [PATCH] remember mode of reiserfs journal [PATCH] propagate mode through swsusp_close() [PATCH] propagate mode through open_bdev_excl/close_bdev_excl [PATCH] pass fmode_t to blkdev_put() [PATCH] kill the unused bsize on the send side of /dev/loop [PATCH] trim file propagation in block/compat_ioctl.c [PATCH] end of methods switch: remove the old ones [PATCH] switch sr [PATCH] switch sd [PATCH] switch ide-scsi [PATCH] switch tape_block [PATCH] switch dcssblk [PATCH] switch dasd [PATCH] switch mtd_blkdevs [PATCH] switch mmc ...
This commit is contained in:
@@ -1396,19 +1396,15 @@ error:
|
||||
return -EINVAL;
|
||||
}
|
||||
|
||||
static int multipath_ioctl(struct dm_target *ti, struct inode *inode,
|
||||
struct file *filp, unsigned int cmd,
|
||||
static int multipath_ioctl(struct dm_target *ti, unsigned int cmd,
|
||||
unsigned long arg)
|
||||
{
|
||||
struct multipath *m = (struct multipath *) ti->private;
|
||||
struct block_device *bdev = NULL;
|
||||
fmode_t mode = 0;
|
||||
unsigned long flags;
|
||||
struct file fake_file = {};
|
||||
struct dentry fake_dentry = {};
|
||||
int r = 0;
|
||||
|
||||
fake_file.f_path.dentry = &fake_dentry;
|
||||
|
||||
spin_lock_irqsave(&m->lock, flags);
|
||||
|
||||
if (!m->current_pgpath)
|
||||
@@ -1416,8 +1412,7 @@ static int multipath_ioctl(struct dm_target *ti, struct inode *inode,
|
||||
|
||||
if (m->current_pgpath) {
|
||||
bdev = m->current_pgpath->path.dev->bdev;
|
||||
fake_dentry.d_inode = bdev->bd_inode;
|
||||
fake_file.f_mode = m->current_pgpath->path.dev->mode;
|
||||
mode = m->current_pgpath->path.dev->mode;
|
||||
}
|
||||
|
||||
if (m->queue_io)
|
||||
@@ -1427,8 +1422,7 @@ static int multipath_ioctl(struct dm_target *ti, struct inode *inode,
|
||||
|
||||
spin_unlock_irqrestore(&m->lock, flags);
|
||||
|
||||
return r ? : blkdev_driver_ioctl(bdev->bd_inode, &fake_file,
|
||||
bdev->bd_disk, cmd, arg);
|
||||
return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg);
|
||||
}
|
||||
|
||||
/*-----------------------------------------------------------------
|
||||
|
Reference in New Issue
Block a user