]> git.baikalelectronics.ru Git - kernel.git/commit
block: revert block_dev read-only check
authorChuck Ebbert <cebbert@redhat.com>
Wed, 16 Feb 2011 23:11:53 +0000 (18:11 -0500)
committerLinus Torvalds <torvalds@linux-foundation.org>
Thu, 17 Feb 2011 00:48:13 +0000 (16:48 -0800)
commit89ef43bcea10c0b05e0f370500668eb6b3e8e5f5
treef732388a0efab2967fddc0afd0f2200731e34d02
parenteb33bab17345687f0bf46605a7f017021ba57972
block: revert block_dev read-only check

This reverts commit de03c9a7f7de ("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: Chuck Ebbert <cebbert@redhat.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
fs/block_dev.c