diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2008-03-02 10:31:15 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2008-10-21 07:48:31 -0400 |
commit | a39907fa2fdb73d3c0fb06eff06d855c3298d707 (patch) | |
tree | d8be7f2fb0fe6ddf037e40b2cc958a6c07a32d95 /drivers | |
parent | fe5f9f2cd57c2ce56f36c66e87a10d4b7a158505 (diff) |
[PATCH] switch md
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/md/md.c | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 21b04d39ba3b..06ea991c7a40 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) | |||
4785 | return 0; | 4785 | return 0; |
4786 | } | 4786 | } |
4787 | 4787 | ||
4788 | static int md_ioctl(struct inode *inode, struct file *file, | 4788 | static int md_ioctl(struct block_device *bdev, fmode_t mode, |
4789 | unsigned int cmd, unsigned long arg) | 4789 | unsigned int cmd, unsigned long arg) |
4790 | { | 4790 | { |
4791 | int err = 0; | 4791 | int err = 0; |
@@ -4823,7 +4823,7 @@ static int md_ioctl(struct inode *inode, struct file *file, | |||
4823 | * Commands creating/starting a new array: | 4823 | * Commands creating/starting a new array: |
4824 | */ | 4824 | */ |
4825 | 4825 | ||
4826 | mddev = inode->i_bdev->bd_disk->private_data; | 4826 | mddev = bdev->bd_disk->private_data; |
4827 | 4827 | ||
4828 | if (!mddev) { | 4828 | if (!mddev) { |
4829 | BUG(); | 4829 | BUG(); |
@@ -4996,13 +4996,13 @@ abort: | |||
4996 | return err; | 4996 | return err; |
4997 | } | 4997 | } |
4998 | 4998 | ||
4999 | static int md_open(struct inode *inode, struct file *file) | 4999 | static int md_open(struct block_device *bdev, fmode_t mode) |
5000 | { | 5000 | { |
5001 | /* | 5001 | /* |
5002 | * Succeed if we can lock the mddev, which confirms that | 5002 | * Succeed if we can lock the mddev, which confirms that |
5003 | * it isn't being stopped right now. | 5003 | * it isn't being stopped right now. |
5004 | */ | 5004 | */ |
5005 | mddev_t *mddev = inode->i_bdev->bd_disk->private_data; | 5005 | mddev_t *mddev = bdev->bd_disk->private_data; |
5006 | int err; | 5006 | int err; |
5007 | 5007 | ||
5008 | if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1))) | 5008 | if ((err = mutex_lock_interruptible_nested(&mddev->reconfig_mutex, 1))) |
@@ -5013,14 +5013,14 @@ static int md_open(struct inode *inode, struct file *file) | |||
5013 | atomic_inc(&mddev->openers); | 5013 | atomic_inc(&mddev->openers); |
5014 | mddev_unlock(mddev); | 5014 | mddev_unlock(mddev); |
5015 | 5015 | ||
5016 | check_disk_change(inode->i_bdev); | 5016 | check_disk_change(bdev); |
5017 | out: | 5017 | out: |
5018 | return err; | 5018 | return err; |
5019 | } | 5019 | } |
5020 | 5020 | ||
5021 | static int md_release(struct inode *inode, struct file * file) | 5021 | static int md_release(struct gendisk *disk, fmode_t mode) |
5022 | { | 5022 | { |
5023 | mddev_t *mddev = inode->i_bdev->bd_disk->private_data; | 5023 | mddev_t *mddev = disk->private_data; |
5024 | 5024 | ||
5025 | BUG_ON(!mddev); | 5025 | BUG_ON(!mddev); |
5026 | atomic_dec(&mddev->openers); | 5026 | atomic_dec(&mddev->openers); |
@@ -5046,9 +5046,9 @@ static int md_revalidate(struct gendisk *disk) | |||
5046 | static struct block_device_operations md_fops = | 5046 | static struct block_device_operations md_fops = |
5047 | { | 5047 | { |
5048 | .owner = THIS_MODULE, | 5048 | .owner = THIS_MODULE, |
5049 | .__open = md_open, | 5049 | .open = md_open, |
5050 | .__release = md_release, | 5050 | .release = md_release, |
5051 | .__ioctl = md_ioctl, | 5051 | .locked_ioctl = md_ioctl, |
5052 | .getgeo = md_getgeo, | 5052 | .getgeo = md_getgeo, |
5053 | .media_changed = md_media_changed, | 5053 | .media_changed = md_media_changed, |
5054 | .revalidate_disk= md_revalidate, | 5054 | .revalidate_disk= md_revalidate, |