Skip to content

Commit

Permalink
memstick: remove mspro_block_mutex
Browse files Browse the repository at this point in the history
mspro_block_mutex is identical in scope to mspro_block_disk_lock and therefore
unnecessary.

Signed-off-by: Alex Dubov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
  • Loading branch information
oakad authored and torvalds committed Jan 13, 2011
1 parent d8256d4 commit edb50b3
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions drivers/memstick/core/mspro_block.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@

#define DRIVER_NAME "mspro_block"

static DEFINE_MUTEX(mspro_block_mutex);
static int major;
module_param(major, int, 0644);

Expand Down Expand Up @@ -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;
int rc = -ENXIO;

mutex_lock(&mspro_block_mutex);
mutex_lock(&mspro_block_disk_lock);

if (msb && msb->card) {
Expand All @@ -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_mutex);

return rc;
}
Expand Down Expand Up @@ -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)
{
int ret;
mutex_lock(&mspro_block_mutex);
ret = mspro_block_disk_release(disk);
mutex_unlock(&mspro_block_mutex);
return ret;
return mspro_block_disk_release(disk);
}

static int mspro_block_bd_getgeo(struct block_device *bdev,
Expand Down

0 comments on commit edb50b3

Please sign in to comment.