diff options
author | Karel Zak | 2010-06-14 09:35:28 +0200 |
---|---|---|
committer | Karel Zak | 2010-06-14 09:35:28 +0200 |
commit | bc77da94f715f819c81ee8d1e6623e5ba6d3c373 (patch) | |
tree | 07098c8cc985503888e08967b1104b4e73701b0e /mount/mount.c | |
parent | docs: fix umount --fake note in ReleaseNotes (diff) | |
download | kernel-qcow2-util-linux-bc77da94f715f819c81ee8d1e6623e5ba6d3c373.tar.gz kernel-qcow2-util-linux-bc77da94f715f819c81ee8d1e6623e5ba6d3c373.tar.xz kernel-qcow2-util-linux-bc77da94f715f819c81ee8d1e6623e5ba6d3c373.zip |
mount: don't create loopdev for MS_BIND
Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=602573
Reported-by: Adam Tkac <atkac@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
Diffstat (limited to 'mount/mount.c')
-rw-r--r-- | mount/mount.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/mount/mount.c b/mount/mount.c index 865665bfa..11936a620 100644 --- a/mount/mount.c +++ b/mount/mount.c @@ -1127,8 +1127,9 @@ loop_check(const char **spec, const char **type, int *flags, * file as a mount(2) source argument. A filesystem that is able to mount * regular files could be implemented. */ - if (!*loop && (!*type || strcmp(*type, "auto") == 0 || - fsprobe_known_fstype(*type))) { + if (!*loop && !(*flags & (MS_BIND | MS_MOVE | MS_PROPAGATION)) && + (!*type || strcmp(*type, "auto") == 0 || fsprobe_known_fstype(*type))) { + struct stat st; if (stat(*loopfile, &st) == 0) *loop = S_ISREG(st.st_mode); |