Commit edb50b3b authored by Alex Dubov's avatar Alex Dubov Committed by Linus Torvalds

memstick: remove mspro_block_mutex

mspro_block_mutex is identical in scope to mspro_block_disk_lock and therefore
unnecessary.
Signed-off-by: default avatarAlex Dubov <oakad@yahoo.com>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent d8256d48
...@@ -23,7 +23,6 @@ ...@@ -23,7 +23,6 @@
#define DRIVER_NAME "mspro_block" #define DRIVER_NAME "mspro_block"
static DEFINE_MUTEX(mspro_block_mutex);
static int major; static int major;
module_param(major, int, 0644); module_param(major, int, 0644);
...@@ -181,7 +180,6 @@ static int mspro_block_bd_open(struct block_device *bdev, fmode_t mode) ...@@ -181,7 +180,6 @@ static int mspro_block_bd_open(struct block_device *bdev, fmode_t mode)
struct mspro_block_data *msb = disk->private_data; struct mspro_block_data *msb = disk->private_data;
int rc = -ENXIO; int rc = -ENXIO;
mutex_lock(&mspro_block_mutex);
mutex_lock(&mspro_block_disk_lock); mutex_lock(&mspro_block_disk_lock);
if (msb && msb->card) { if (msb && msb->card) {
...@@ -193,7 +191,6 @@ static int mspro_block_bd_open(struct block_device *bdev, fmode_t mode) ...@@ -193,7 +191,6 @@ static int mspro_block_bd_open(struct block_device *bdev, fmode_t mode)
} }
mutex_unlock(&mspro_block_disk_lock); mutex_unlock(&mspro_block_disk_lock);
mutex_unlock(&mspro_block_mutex);
return rc; return rc;
} }
...@@ -225,11 +222,7 @@ static int mspro_block_disk_release(struct gendisk *disk) ...@@ -225,11 +222,7 @@ static int mspro_block_disk_release(struct gendisk *disk)
static int mspro_block_bd_release(struct gendisk *disk, fmode_t mode) static int mspro_block_bd_release(struct gendisk *disk, fmode_t mode)
{ {
int ret; return mspro_block_disk_release(disk);
mutex_lock(&mspro_block_mutex);
ret = mspro_block_disk_release(disk);
mutex_unlock(&mspro_block_mutex);
return ret;
} }
static int mspro_block_bd_getgeo(struct block_device *bdev, static int mspro_block_bd_getgeo(struct block_device *bdev,
......
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