[PATCH] uml ubd: handle readonly status
authorPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Sun, 1 May 2005 15:58:57 +0000 (08:58 -0700)
committerLinus Torvalds <torvalds@ppc970.osdl.org>
Sun, 1 May 2005 15:58:57 +0000 (08:58 -0700)
commit2c49be99ede1e3685a9817a564b4b1678d48e1b9
treed5e0b59f25351e4bfd80fc656e8f872c83c5f885
parentacef2e55d2a1b59bb5610cacc546c1d1b5de2dc9
[PATCH] uml ubd: handle readonly status

Use the set_disk_ro() API when the backing file is read-only, to mark the disk
read-only, during the ->open().  The current hack does not work when doing a
mount -o remount.

Also, mark explicitly the code paths which should no more be triggerable (I've
removed the WARN_ON(1) things).  They should actually become BUG()s probably
but I'll avoid that since I'm not so sure the change works so well.  I gave it
only some limited testing.

Signed-off-by: Paolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
CC: Jens Axboe <axboe@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
arch/um/drivers/ubd_kern.c