diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-10-23 13:23:07 -0400 |
commit | 22484856402bfa1ff3defe47f6029ab0418240d9 (patch) | |
tree | 140c67bf59674da350a7b51765d6ff7eb101b597 /drivers/md/dm-mpath.c | |
parent | 5ed487bc2c44ca4e9668ef9cb54c830e2a9fac47 (diff) | |
parent | 56b26add02b4bdea81d5e0ebda60db1fe3311ad4 (diff) |
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
...
Diffstat (limited to 'drivers/md/dm-mpath.c')
-rw-r--r-- | drivers/md/dm-mpath.c | 14 |
1 files changed, 4 insertions, 10 deletions
diff --git a/drivers/md/dm-mpath.c b/drivers/md/dm-mpath.c index abf6e8cfaedb..4840733cd903 100644 --- a/drivers/md/dm-mpath.c +++ b/drivers/md/dm-mpath.c | |||
@@ -1396,19 +1396,15 @@ error: | |||
1396 | return -EINVAL; | 1396 | return -EINVAL; |
1397 | } | 1397 | } |
1398 | 1398 | ||
1399 | static int multipath_ioctl(struct dm_target *ti, struct inode *inode, | 1399 | static int multipath_ioctl(struct dm_target *ti, unsigned int cmd, |
1400 | struct file *filp, unsigned int cmd, | ||
1401 | unsigned long arg) | 1400 | unsigned long arg) |
1402 | { | 1401 | { |
1403 | struct multipath *m = (struct multipath *) ti->private; | 1402 | struct multipath *m = (struct multipath *) ti->private; |
1404 | struct block_device *bdev = NULL; | 1403 | struct block_device *bdev = NULL; |
1404 | fmode_t mode = 0; | ||
1405 | unsigned long flags; | 1405 | unsigned long flags; |
1406 | struct file fake_file = {}; | ||
1407 | struct dentry fake_dentry = {}; | ||
1408 | int r = 0; | 1406 | int r = 0; |
1409 | 1407 | ||
1410 | fake_file.f_path.dentry = &fake_dentry; | ||
1411 | |||
1412 | spin_lock_irqsave(&m->lock, flags); | 1408 | spin_lock_irqsave(&m->lock, flags); |
1413 | 1409 | ||
1414 | if (!m->current_pgpath) | 1410 | if (!m->current_pgpath) |
@@ -1416,8 +1412,7 @@ static int multipath_ioctl(struct dm_target *ti, struct inode *inode, | |||
1416 | 1412 | ||
1417 | if (m->current_pgpath) { | 1413 | if (m->current_pgpath) { |
1418 | bdev = m->current_pgpath->path.dev->bdev; | 1414 | bdev = m->current_pgpath->path.dev->bdev; |
1419 | fake_dentry.d_inode = bdev->bd_inode; | 1415 | mode = m->current_pgpath->path.dev->mode; |
1420 | fake_file.f_mode = m->current_pgpath->path.dev->mode; | ||
1421 | } | 1416 | } |
1422 | 1417 | ||
1423 | if (m->queue_io) | 1418 | if (m->queue_io) |
@@ -1427,8 +1422,7 @@ static int multipath_ioctl(struct dm_target *ti, struct inode *inode, | |||
1427 | 1422 | ||
1428 | spin_unlock_irqrestore(&m->lock, flags); | 1423 | spin_unlock_irqrestore(&m->lock, flags); |
1429 | 1424 | ||
1430 | return r ? : blkdev_driver_ioctl(bdev->bd_inode, &fake_file, | 1425 | return r ? : __blkdev_driver_ioctl(bdev, mode, cmd, arg); |
1431 | bdev->bd_disk, cmd, arg); | ||
1432 | } | 1426 | } |
1433 | 1427 | ||
1434 | /*----------------------------------------------------------------- | 1428 | /*----------------------------------------------------------------- |