diff --git a/fs/block_dev.c b/fs/block_dev.c index 99d6af8117473b661a64a5f05e58a024570d4fe0..b3171fb0dc9ab4f90eac307ed5782541f2736a0f 100644 --- a/fs/block_dev.c +++ b/fs/block_dev.c @@ -681,8 +681,8 @@ static int bd_prepare_to_claim(struct block_device *bdev, 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);