From bc77da94f715f819c81ee8d1e6623e5ba6d3c373 Mon Sep 17 00:00:00 2001 From: Karel Zak Date: Mon, 14 Jun 2010 09:35:28 +0200 Subject: [PATCH] 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 --- mount/mount.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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); -- 2.39.5