• Chuck Ebbert's avatar
    block: revert block_dev read-only check · e51900f7
    Chuck Ebbert authored
    This reverts commit 75f1dc0d ("block: check bdev_read_only() from
    blkdev_get()").  That commit added stricter checking to make sure
    devices that were being used read-only were actually opened in that
    mode.
    
    It turns out that the change breaks a bunch of kernel code that opens
    block devices.  Affected systems include dm, md, and the loop device.
    Because strict checking for read-only opens of block devices was not
    done before this, the code that opens the devices was opening them
    read-write even if they were being used read-only.  Auditing all that
    code will take time, and new userspace packages for dm, mdadm, etc.
    will also be required.
    Signed-off-by: default avatarChuck Ebbert <cebbert@redhat.com>
    Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
    e51900f7
block_dev.c 39.1 KB