The patch titled fix bd_claim_by_kobject() error handling has been added to the -mm tree. Its filename is fix-bd_claim_by_kobject-error-handling.patch See http://www.zip.com.au/~akpm/linux/patches/stuff/added-to-mm.txt to find out what to do about this ------------------------------------------------------ Subject: fix bd_claim_by_kobject() error handling From: "Jun'ichi Nomura" <j-nomura@xxxxxxxxxxxxx> Fix bd_claim_by_kobject to release bdev correctly in case that bd_claim succeeds but following add_bd_holder fails. If it happens, the caller takes it didn't bd_claim() where actually it did. The bdev becomes no longer bd_claim-able from others. I don't have any reproducible test case for it but it's a bug. The bug is introduced in 2.6.18-rc1-mm2 and now in 2.6.19-rc3. Signed-off-by: Jun'ichi Nomura <j-nomura@xxxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxx> --- fs/block_dev.c | 5 ++++- 1 files changed, 4 insertions(+), 1 deletion(-) diff -puN fs/block_dev.c~fix-bd_claim_by_kobject-error-handling fs/block_dev.c --- a/fs/block_dev.c~fix-bd_claim_by_kobject-error-handling +++ a/fs/block_dev.c @@ -751,8 +751,11 @@ static int bd_claim_by_kobject(struct bl mutex_lock_nested(&bdev->bd_mutex, BD_MUTEX_PARTITION); res = bd_claim(bdev, holder); - if (res == 0) + if (res == 0) { res = add_bd_holder(bdev, bo); + if (res) + bd_release(bdev); + } if (res) free_bd_holder(bo); mutex_unlock(&bdev->bd_mutex); _ Patches currently in -mm which might be from j-nomura@xxxxxxxxxxxxx are fix-bd_claim_by_kobject-error-handling.patch 2-2-clean-up-add_bd_holder.patch - To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html