• T
    block: check bdev_read_only() from blkdev_get() · 75f1dc0d
    Tejun Heo 提交于
    bdev read-only status can be queried using bdev_read_only() and may
    change while the device is being opened.  Enforce it by checking it
    from blkdev_get() after open succeeds.
    
    This makes bdev_read_only() check in open_bdev_exclusive() and
    fsg_lun_open() unnecessary.  Drop them.
    Signed-off-by: NTejun Heo <tj@kernel.org>
    Cc: David Brownell <dbrownell@users.sourceforge.net>
    Cc: linux-usb@vger.kernel.org
    75f1dc0d
block_dev.c 35.9 KB