From: Karel Zak Date: Mon, 14 Jun 2010 07:35:28 +0000 (+0200) Subject: mount: don't create loopdev for MS_BIND X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=bc77da94f715f819c81ee8d1e6623e5ba6d3c373;p=util-linux mount: don't create loopdev for MS_BIND Addresses: http://bugzilla.redhat.com/show_bug.cgi?id=602573 Reported-by: Adam Tkac Signed-off-by: Karel Zak --- diff --git a/mount/mount.c b/mount/mount.c index 865665bf..11936a62 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);