summaryrefslogtreecommitdiffstats
path: root/mount/mount.c
diff options
context:
space:
mode:
Diffstat (limited to 'mount/mount.c')
-rw-r--r--mount/mount.c5
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);