libbb/loop: don't try to re-use existing loop device
authorKevin Wallace <k@igneous.io>
Wed, 4 Feb 2015 00:17:29 +0000 (16:17 -0800)
committerDenys Vlasenko <vda.linux@googlemail.com>
Sat, 7 Feb 2015 18:13:57 +0000 (19:13 +0100)
commit782ee2aa0e1646aebc96c8590ddc0a16405b8297
tree8fd6b0c0a5ca7f1657d764b359f78dd0f1f25b9b
parenta03195941b40f0d740f06d23648f672fe81d4ecf
libbb/loop: don't try to re-use existing loop device

loopinfo.lo_file_name is not enough to uniquely identify a file on a system with
multiple mount namespaces.  We could conceivably change this to dedup on
(lo_rdevice, lo_inode), but, as the comment above the deleted code notes, this
whole approach of reusing devices is racy anyway, so it seems better to stop
doing it entirely.

Signed-off-by: Kevin Wallace <k@igneous.io>
Signed-off-by: Denys Vlasenko <vda.linux@googlemail.com>
libbb/loop.c