libext2fs: don't scan /etc/mtab if file system not found in /proc/mounts

Previously we would scan /etc/mtab if the device is not found in
/proc/mounts.  This is because previously, /etc/mtab would have the
filename for a loopback mount, while /proc/mounts would only have
something like /dev/loop0.  Since on many systems /etc/mtab is now a
symlink to /proc/mounts, ismounted.c has a special function,
check_loop_mounted.

For this reason, it's not necessary to fall back to trying to scan
/etc/mtab if a device / filename is not found from scanning
/proc/mounts.  This also prevents failures if the file /etc/mtab does
not exist but /proc/mounts does exist when checking to see if a device
is mounted when it isn't.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
1 file changed