Commit 7290bad4 authored by Alexander Viro's avatar Alexander Viro Committed by Linus Torvalds

[PATCH] (4/15) big struct block_device * push (first series)

 - switch block_ioctl() to struct block_device *
parent 13b52b0b
...@@ -211,7 +211,6 @@ int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg *arg) ...@@ -211,7 +211,6 @@ int blkpg_ioctl(struct block_device *bdev, struct blkpg_ioctl_arg *arg)
/* /*
* Common ioctl's for block devices * Common ioctl's for block devices
*/ */
extern int block_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg);
int blk_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg) int blk_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg)
{ {
request_queue_t *q; request_queue_t *q;
...@@ -221,7 +220,7 @@ int blk_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg) ...@@ -221,7 +220,7 @@ int blk_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg)
kdev_t dev = to_kdev_t(bdev->bd_dev); kdev_t dev = to_kdev_t(bdev->bd_dev);
int holder; int holder;
intval = block_ioctl(dev, cmd, arg); intval = block_ioctl(bdev, cmd, arg);
if (intval != -ENOTTY) if (intval != -ENOTTY)
return intval; return intval;
......
...@@ -51,13 +51,13 @@ int blk_do_rq(request_queue_t *q, struct request *rq) ...@@ -51,13 +51,13 @@ int blk_do_rq(request_queue_t *q, struct request *rq)
return err; return err;
} }
int block_ioctl(kdev_t dev, unsigned int cmd, unsigned long arg) int block_ioctl(struct block_device *bdev, unsigned int cmd, unsigned long arg)
{ {
request_queue_t *q; request_queue_t *q;
struct request *rq; struct request *rq;
int close = 0, err; int close = 0, err;
q = blk_get_queue(dev); q = blk_get_queue(to_kdev_t(bdev->bd_dev));
if (!q) if (!q)
return -ENXIO; return -ENXIO;
......
...@@ -2572,7 +2572,7 @@ static int ide_ioctl (struct inode *inode, struct file *file, ...@@ -2572,7 +2572,7 @@ static int ide_ioctl (struct inode *inode, struct file *file,
*/ */
case CDROMEJECT: case CDROMEJECT:
case CDROMCLOSETRAY: case CDROMCLOSETRAY:
return block_ioctl(inode->i_rdev, cmd, arg); return block_ioctl(inode->i_bdev, cmd, arg);
case HDIO_GET_BUSSTATE: case HDIO_GET_BUSSTATE:
if (!capable(CAP_SYS_ADMIN)) if (!capable(CAP_SYS_ADMIN))
......
...@@ -291,7 +291,7 @@ extern void blk_plug_device(request_queue_t *); ...@@ -291,7 +291,7 @@ extern void blk_plug_device(request_queue_t *);
extern void blk_recount_segments(request_queue_t *, struct bio *); extern void blk_recount_segments(request_queue_t *, struct bio *);
extern inline int blk_phys_contig_segment(request_queue_t *q, struct bio *, struct bio *); extern inline int blk_phys_contig_segment(request_queue_t *q, struct bio *, struct bio *);
extern inline int blk_hw_contig_segment(request_queue_t *q, struct bio *, struct bio *); extern inline int blk_hw_contig_segment(request_queue_t *q, struct bio *, struct bio *);
extern int block_ioctl(kdev_t, unsigned int, unsigned long); extern int block_ioctl(struct block_device *, unsigned int, unsigned long);
extern int ll_10byte_cmd_build(request_queue_t *, struct request *); extern int ll_10byte_cmd_build(request_queue_t *, struct request *);
/* /*
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment