From: "Alex Dubov" <oakad@yahoo.com>
To: "LKML" <linux-kernel@vger.kernel.org>
Cc: "Andrew Morton" <akpm@linux-foundation.org>,
"Maxim Levitsky" <maximlevitsky@gmail.com>,
Alex Dubov <oakad@yahoo.com>
Subject: [PATCH 2/4] memstick: remove mspro_block_mutex
Date: Wed, 27 Oct 2010 04:41:09 +1100 [thread overview]
Message-ID: <1288114871-805-3-git-send-email-oakad@yahoo.com> (raw)
In-Reply-To: <1288114871-805-2-git-send-email-oakad@yahoo.com>
From: Alex Dubov <oakad@yahoo.com>
mspro_block_mutex is identical in scope to mspro_block_disk_lock and therefore
unnecessary.
Signed-off-by: Alex Dubov <oakad@yahoo.com>
---
drivers/memstick/core/mspro_block.c | 9 +--------
1 files changed, 1 insertions(+), 8 deletions(-)
diff --git a/drivers/memstick/core/mspro_block.c b/drivers/memstick/core/mspro_block.c
index a167938..b11b2b8 100644
--- a/drivers/memstick/core/mspro_block.c
+++ b/drivers/memstick/core/mspro_block.c
@@ -23,7 +23,6 @@
#define DRIVER_NAME "mspro_block"
-static DEFINE_MUTEX(mspro_block_mutex);
static int major;
module_param(major, int, 0644);
@@ -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) {
@@ -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;
}
@@ -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,
--
1.6.5.1
next prev parent reply other threads:[~2010-10-26 18:01 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-26 17:41 memstick: Alternative approach to proposed fixes Alex Dubov
2010-10-26 17:41 ` [PATCH 1/4] memstick: avert possible race condition between idr_pre_get and idr_get_new Alex Dubov
2010-10-26 17:41 ` Alex Dubov [this message]
2010-10-26 17:41 ` [PATCH 3/4] memstick: factor out transfer initiating functionality in mspro_block.c Alex Dubov
2010-10-26 17:41 ` [PATCH 4/4] memstick: add support for MSPro specific data transfer method Alex Dubov
2010-10-26 22:55 ` memstick: Alternative approach to proposed fixes Maxim Levitsky
2010-10-26 23:07 ` Maxim Levitsky
2010-10-26 23:08 ` Maxim Levitsky
2010-10-27 6:20 ` Alex Dubov
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288114871-805-3-git-send-email-oakad@yahoo.com \
--to=oakad@yahoo.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maximlevitsky@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome