Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 38083
b: refs/heads/master
c: 7006f6e
h: refs/heads/master
i:
  38081: 3e35be4
  38079: e5482c7
v: v3
  • Loading branch information
Alasdair G Kergon authored and Linus Torvalds committed Oct 3, 2006
1 parent cbe6f49 commit 44a548e
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 9af4aa30b713a58e5952045f52c41a6e3baa2fdc
refs/heads/master: 7006f6eca874cd44d37ccb8cfeb8bed04e3bff22
5 changes: 3 additions & 2 deletions trunk/block/ioctl.c
Original file line number Diff line number Diff line change
Expand Up @@ -199,8 +199,8 @@ static int blkdev_locked_ioctl(struct file *file, struct block_device *bdev,
return -ENOIOCTLCMD;
}

static int blkdev_driver_ioctl(struct inode *inode, struct file *file,
struct gendisk *disk, unsigned cmd, unsigned long arg)
int blkdev_driver_ioctl(struct inode *inode, struct file *file,
struct gendisk *disk, unsigned cmd, unsigned long arg)
{
int ret;
if (disk->fops->unlocked_ioctl)
Expand All @@ -215,6 +215,7 @@ static int blkdev_driver_ioctl(struct inode *inode, struct file *file,

return -ENOTTY;
}
EXPORT_SYMBOL_GPL(blkdev_driver_ioctl);

int blkdev_ioctl(struct inode *inode, struct file *file, unsigned cmd,
unsigned long arg)
Expand Down
2 changes: 1 addition & 1 deletion trunk/drivers/md/dm-linear.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ static int linear_ioctl(struct dm_target *ti, struct inode *inode,
struct linear_c *lc = (struct linear_c *) ti->private;
struct block_device *bdev = lc->dev->bdev;

return blkdev_ioctl(bdev->bd_inode, filp, cmd, arg);
return blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk, cmd, arg);
}

static struct target_type linear_target = {
Expand Down
3 changes: 2 additions & 1 deletion trunk/drivers/md/dm-mpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -1290,7 +1290,8 @@ static int multipath_ioctl(struct dm_target *ti, struct inode *inode,

spin_unlock_irqrestore(&m->lock, flags);

return r ? : blkdev_ioctl(bdev->bd_inode, filp, cmd, arg);
return r ? : blkdev_driver_ioctl(bdev->bd_inode, filp, bdev->bd_disk,
cmd, arg);
}

/*-----------------------------------------------------------------
Expand Down
3 changes: 3 additions & 0 deletions trunk/include/linux/fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -1523,6 +1523,9 @@ extern const struct file_operations def_fifo_fops;
#ifdef CONFIG_BLOCK
extern int ioctl_by_bdev(struct block_device *, unsigned, unsigned long);
extern int blkdev_ioctl(struct inode *, struct file *, unsigned, unsigned long);
extern int blkdev_driver_ioctl(struct inode *inode, struct file *file,
struct gendisk *disk, unsigned cmd,
unsigned long arg);
extern long compat_blkdev_ioctl(struct file *, unsigned, unsigned long);
extern int blkdev_get(struct block_device *, mode_t, unsigned);
extern int blkdev_put(struct block_device *);
Expand Down

0 comments on commit 44a548e

Please sign in to comment.