]> git.neil.brown.name Git - history.git/commit
[PATCH] use bd_claim in the raw driver
authorAndrew Morton <akpm@digeo.com>
Fri, 1 Nov 2002 04:00:46 +0000 (20:00 -0800)
committerLinus Torvalds <torvalds@home.transmeta.com>
Fri, 1 Nov 2002 04:00:46 +0000 (20:00 -0800)
commit3480cbc1744c036baa40e3c29eb38196ec995f27
treeca0fc27ee4bd783113b826eab8bb4752c979f7a8
parentd97ec37c5c2c0eb8a94f117651a7f9940aff1953
[PATCH] use bd_claim in the raw driver

Currently if you use the raw driver against /dev/hda1 while it has an
fs mounted, everything gets confused and the kernel locks up or oopses.

Al said to use bd_claim().  This prevents the raw driver from being
able to open the device under these circumstances.

There is value in being able to read the raw device while there's a
filesystem mounted: to poke around at the disk without interacting with
the kernel's caching.  You can still do that, with an O_DIRECT open of
/dev/hda1.
drivers/char/raw.c