diff mbox

[RESEND,block#for-2.6.36] block_dev: always serialize exclusive open attempts

Message ID 4C598E6B.7050405@gmail.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tejun Heo Aug. 4, 2010, 3:59 p.m. UTC
None
diff mbox

Patch

diff --git a/fs/block_dev.c b/fs/block_dev.c
index 99d6af8..b3171fb 100644
--- a/fs/block_dev.c
+++ b/fs/block_dev.c
@@ -681,8 +681,8 @@  retry:
 	if (!bd_may_claim(bdev, whole, holder))
 		return -EBUSY;

-	/* if someone else is claiming, wait for it to finish */
-	if (whole->bd_claiming && whole->bd_claiming != holder) {
+	/* if claiming is already in progress, wait for it to finish */
+	if (whole->bd_claiming) {
 		wait_queue_head_t *wq = bit_waitqueue(&whole->bd_claiming, 0);
 		DEFINE_WAIT(wait);