Commit 75f1dc0d (block: check bdev_read_only() from blkdev_get()) enforced bdev_read_only() check during blkdev_get(). This had an unfortunate side effect on loop because loop didn't clear ro flag on fd detach, so once a loop device was used ro, it can't be used for rw at all. Fix it by clearing ro flag on fd detach. Signed-off-by: Tejun Heo <tj@xxxxxxxxxx> Reported-by: "J. R. Okajima" <hooanon05@xxxxxxxxxxx> --- drivers/block/loop.c | 1 + 1 file changed, 1 insertion(+) Index: work/drivers/block/loop.c =================================================================== --- work.orig/drivers/block/loop.c +++ work/drivers/block/loop.c @@ -1041,6 +1041,7 @@ static int loop_clr_fd(struct loop_devic set_capacity(lo->lo_disk, 0); loop_sysfs_exit(lo); bd_set_size(bdev, 0); + set_device_ro(bdev, 0); /* let user-space know about this change */ kobject_uevent(&disk_to_dev(bdev->bd_disk)->kobj, KOBJ_CHANGE); mapping_set_gfp_mask(filp->f_mapping, gfp); -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html