[PATCH] umount: unconditionally delete loopback device

Denys Vlasenko vda.linux at googlemail.com
Mon Apr 16 01:17:43 UTC 2012


On Friday 06 April 2012 10:41, Florian Fainelli wrote:
> I have been recently caught by an interesting issue, illustrated by the
> following use case:
> 
> "foo" is a cramfs filesystem file which might help illustrate the issue
> below:
> 
> 1) loopback mount "foo" to mount point /bar
> 2) umount /bar
> 3) append new files and re-generate the "foo" cramfs image
> 4) loopback mount "foo" to mount point /bar again
> 5) the contents of /bar are the same as in 1) and not 3)
> 
> the reason for this is because busybox has not deleted the "foo" <->
> loopback device mapping, so when we attempt to mount again "foo", the
> mapping is already there, so the loopback device is not deleted then
> re-created.
> 
> util-linux' umount unconditionnaly deletes the loop device upon umount

It does that? Really? Which version of util-linux did you test?

-- 
vda



More information about the busybox mailing list