[PATCH 06/29] memstick: mspro: kill the BKL

From: Maxim Levitsky
Date: Fri Oct 22 2010 - 19:59:45 EST


mspro_block_disk_lock already protects the code.

Signed-off-by: Maxim Levitsky <maximlevitsky@xxxxxxxxx>
---
drivers/memstick/core/mspro_block.c | 6 ------
1 files changed, 0 insertions(+), 6 deletions(-)

diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index 5dc8fd7..a979c9d 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -36,7 +36,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;

- lock_kernel();
mutex_lock(&mspro_block_disk_lock);

if (msb && msb->card) {
@@ -48,8 +47,6 @@ static int mspro_block_bd_open(struct block_device *bdev, fmode_t mode)
}

mutex_unlock(&mspro_block_disk_lock);
- unlock_kernel();
-
return rc;
}

@@ -74,16 +71,13 @@ static int mspro_block_disk_release(struct gendisk *disk)
}

mutex_unlock(&mspro_block_disk_lock);
-
return 0;
}

static int mspro_block_bd_release(struct gendisk *disk, fmode_t mode)
{
int ret;
- lock_kernel();
ret = mspro_block_disk_release(disk);
- unlock_kernel();
return ret;
}

--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/