diff options
author | NeilBrown <neilb@suse.de> | 2010-10-28 17:30:21 +1100 |
---|---|---|
committer | NeilBrown <neilb@suse.de> | 2010-10-28 17:30:21 +1100 |
commit | 4b532c9b8c87eb8e51605c4d08dfb5139c758dc5 (patch) | |
tree | 14d4813285bb4aff8e1d7a58a2fdfadd14803a9f /drivers/md | |
parent | d97a41dc9c44f5829b7af7aa69fda10fd82b6b4e (diff) | |
download | linux-4b532c9b8c87eb8e51605c4d08dfb5139c758dc5.tar.gz linux-4b532c9b8c87eb8e51605c4d08dfb5139c758dc5.tar.bz2 linux-4b532c9b8c87eb8e51605c4d08dfb5139c758dc5.zip |
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 @@ #define DEBUG 0 #define dprintk(x...) ((void)(DEBUG && printk(x))) -static DEFINE_MUTEX(md_mutex); - #ifndef MODULE static void autostart_arrays(int part); #endif @@ -5887,7 +5885,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) mddev_t *mddev = mddev_find(bdev->bd_dev); int err; - mutex_lock(&md_mutex); if (mddev->gendisk != bdev->bd_disk) { /* we are racing with mddev_put which is discarding this * bd_disk. @@ -5896,7 +5893,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) /* Wait until bdev->bd_disk is definitely gone */ flush_scheduled_work(); /* Then retry the open from the top */ - mutex_unlock(&md_mutex); return -ERESTARTSYS; } BUG_ON(mddev != bdev->bd_disk->private_data); @@ -5910,7 +5906,6 @@ static int md_open(struct block_device *bdev, fmode_t mode) check_disk_size_change(mddev->gendisk, bdev); out: - mutex_unlock(&md_mutex); return err; } @@ -5919,10 +5914,8 @@ static int md_release(struct gendisk *disk, fmode_t mode) mddev_t *mddev = disk->private_data; BUG_ON(!mddev); - mutex_lock(&md_mutex); atomic_dec(&mddev->openers); mddev_put(mddev); - mutex_unlock(&md_mutex); return 0; } |