summaryrefslogtreecommitdiffstats
path: root/drivers/md
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2008-03-02 10:31:15 -0500
committerAl Viro <viro@zeniv.linux.org.uk>2008-10-21 07:48:31 -0400
commita39907fa2fdb73d3c0fb06eff06d855c3298d707 (patch)
treed8be7f2fb0fe6ddf037e40b2cc958a6c07a32d95 /drivers/md
parentfe5f9f2cd57c2ce56f36c66e87a10d4b7a158505 (diff)
downloadop-kernel-dev-a39907fa2fdb73d3c0fb06eff06d855c3298d707.zip
op-kernel-dev-a39907fa2fdb73d3c0fb06eff06d855c3298d707.tar.gz
[PATCH] switch md
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/md.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c
index 21b04d3..06ea991 100644
--- a/drivers/md/md.c
+++ b/drivers/md/md.c
@@ -4785,7 +4785,7 @@ static int md_getgeo(struct block_device *bdev, struct hd_geometry *geo)
return 0;
}
-static int md_ioctl(struct inode *inode, struct file *file,
+static int md_ioctl(struct block_device *bdev, fmode_t mode,
unsigned int cmd, unsigned long arg)
{
int err = 0;
@@ -4823,7 +4823,7 @@ static int md_ioctl(struct inode *inode, struct file *file,
* Commands creating/starting a new array:
*/
- mddev = inode->i_bdev->bd_disk->private_data;
+ mddev = bdev->bd_disk->private_data;
if (!mddev) {
BUG();
@@ -4996,13 +4996,13 @@ abort:
return err;
}
-static int md_open(struct inode *inode, struct file *file)
+static int md_open(struct block_device *bdev, fmode_t mode)
{
/*
* Succeed if we can lock the mddev, which confirms that
* it isn't being stopped right now.
*/
- mddev_t *mddev = inode->i_bdev->bd_disk->private_data;
+ mddev_t *mddev = bdev->bd_disk->private_data;
int err;
if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1)))
@@ -5013,14 +5013,14 @@ static int md_open(struct inode *inode, struct file *file)
atomic_inc(&mddev->openers);
mddev_unlock(mddev);
- check_disk_change(inode->i_bdev);
+ check_disk_change(bdev);
out:
return err;
}
-static int md_release(struct inode *inode, struct file * file)
+static int md_release(struct gendisk *disk, fmode_t mode)
{
- mddev_t *mddev = inode->i_bdev->bd_disk->private_data;
+ mddev_t *mddev = disk->private_data;
BUG_ON(!mddev);
atomic_dec(&mddev->openers);
@@ -5046,9 +5046,9 @@ static int md_revalidate(struct gendisk *disk)
static struct block_device_operations md_fops =
{
.owner = THIS_MODULE,
- .__open = md_open,
- .__release = md_release,
- .__ioctl = md_ioctl,
+ .open = md_open,
+ .release = md_release,
+ .locked_ioctl = md_ioctl,
.getgeo = md_getgeo,
.media_changed = md_media_changed,
.revalidate_disk= md_revalidate,
OpenPOWER on IntegriCloud