diff options
author | NeilBrown <neilb@suse.de> | 2010-10-28 02:30:21 -0400 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-10-28 02:30:21 -0400 |
commit | 4b532c9b8c87eb8e51605c4d08dfb5139c758dc5 (patch) | |
tree | 14d4813285bb4aff8e1d7a58a2fdfadd14803a9f /drivers/md | |
parent | d97a41dc9c44f5829b7af7aa69fda10fd82b6b4e (diff) |
md: remove md_mutex locking.
lock_kernel calls were recently pushed down into open/release
functions.
md doesn't need that protection.
Then the BKL calls were change to md_mutex. We don't need those
either.
So remove it all.
Signed-off-by: NeilBrown <neilb@suse.de>
Diffstat (limited to 'drivers/md')
-rw-r--r-- | drivers/md/md.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/md/md.c b/drivers/md/md.c index 64f97168cefa..2399168b6315 100644 --- a/drivers/md/md.c +++ b/drivers/md/md.c | |||
@@ -57,8 +57,6 @@ | |||
57 | #define DEBUG 0 | 57 | #define DEBUG 0 |
58 | #define dprintk(x...) ((void)(DEBUG && printk(x))) | 58 | #define dprintk(x...) ((void)(DEBUG && printk(x))) |
59 | 59 | ||
60 | static DEFINE_MUTEX(md_mutex); | ||
61 | |||
62 | #ifndef MODULE | 60 | #ifndef MODULE |
63 | static void autostart_arrays(int part); | 61 | static void autostart_arrays(int part); |
64 | #endif | 62 | #endif |
@@ -5887,7 +5885,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) | |||
5887 | mddev_t *mddev = mddev_find(bdev->bd_dev); | 5885 | mddev_t *mddev = mddev_find(bdev->bd_dev); |
5888 | int err; | 5886 | int err; |
5889 | 5887 | ||
5890 | mutex_lock(&md_mutex); | ||
5891 | if (mddev->gendisk != bdev->bd_disk) { | 5888 | if (mddev->gendisk != bdev->bd_disk) { |
5892 | /* we are racing with mddev_put which is discarding this | 5889 | /* we are racing with mddev_put which is discarding this |
5893 | * bd_disk. | 5890 | * bd_disk. |
@@ -5896,7 +5893,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) | |||
5896 | /* Wait until bdev->bd_disk is definitely gone */ | 5893 | /* Wait until bdev->bd_disk is definitely gone */ |
5897 | flush_scheduled_work(); | 5894 | flush_scheduled_work(); |
5898 | /* Then retry the open from the top */ | 5895 | /* Then retry the open from the top */ |
5899 | mutex_unlock(&md_mutex); | ||
5900 | return -ERESTARTSYS; | 5896 | return -ERESTARTSYS; |
5901 | } | 5897 | } |
5902 | BUG_ON(mddev != bdev->bd_disk->private_data); | 5898 | BUG_ON(mddev != bdev->bd_disk->private_data); |
@@ -5910,7 +5906,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) | |||
5910 | 5906 | ||
5911 | check_disk_size_change(mddev->gendisk, bdev); | 5907 | check_disk_size_change(mddev->gendisk, bdev); |
5912 | out: | 5908 | out: |
5913 | mutex_unlock(&md_mutex); | ||
5914 | return err; | 5909 | return err; |
5915 | } | 5910 | } |
5916 | 5911 | ||
@@ -5919,10 +5914,8 @@ static int md_release(struct gendisk *disk, fmode_t mode) | |||
5919 | mddev_t *mddev = disk->private_data; | 5914 | mddev_t *mddev = disk->private_data; |
5920 | 5915 | ||
5921 | BUG_ON(!mddev); | 5916 | BUG_ON(!mddev); |
5922 | mutex_lock(&md_mutex); | ||
5923 | atomic_dec(&mddev->openers); | 5917 | atomic_dec(&mddev->openers); |
5924 | mddev_put(mddev); | 5918 | mddev_put(mddev); |
5925 | mutex_unlock(&md_mutex); | ||
5926 | 5919 | ||
5927 | return 0; | 5920 | return 0; |
5928 | } | 5921 | } |