allow-auto-destruction-of-loop-devices
commitd37c83056842d41c9236f7cf3a9b917a3091cb60
authorDavid Woodhouse <dwmw2@infradead.org>
Tue, 30 Oct 2007 19:29:29 +0000 (30 19:29 +0000)
committerMatthias Urlichs <smurf@hera.kernel.org>
Wed, 14 Nov 2007 11:28:57 +0000 (14 11:28 +0000)
tree7986be2bf55ea318b4a04d39aa7a4d2be4ac4b25
parent368a2256af2d5573713d4af4a208eb9b52f1b6ac
allow-auto-destruction-of-loop-devices

This allows a flag to be set on loop devices so that when they are
closed for the last time, they'll self-destruct.

In general, so that we can automatically allocate loop devices (as with
losetup -f) and have them disappear when we're done with them.

In particular, right now, so that we can stop relying on the hackish
special-case in umount(8) which kills off loop devices which were set up by
'mount -oloop'.  That means we can stop putting crap in /etc/mtab which
doesn't belong there, which means it can be a symlink to /proc/mounts, which
means yet another writable file on the root filesystem is eliminated and the
'stateless' folks get happier...  and OLPC trac #356 can be closed.

The mount(8) side of that is at
http://marc.info/?l=util-linux-ng&m=119362955431694&w=2

Signed-off-by: David Woodhouse <dwmw2@infradead.org>
Cc: Bernardo Innocenti <bernie@codewiz.org>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
drivers/block/loop.c
include/linux/loop.h