Bind mount bug?

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I'm not sure whether this is a bug or expected behavior.
Suppose I create a "looped" bind mount situation as follows.

# mkdir test
# touch test/foo
# mkdir bindtest
# touch bindtest/bar
# mkdir bindtest/test
# mount --bind test/ bindtest/test/
# ls bindtest/test/
foo
# mount --bind bindtest/ test/
# ls test/
bar  test
# ls test/test/
#

I'd expected the last command to list "foo", but it shows an empty dir.
Shouldn't it also show the original contents of test (as they were before 
the first bind mount)?

# mount | grep test
/root/test on /root/bindtest/test type none (rw,bind)
/root/bindtest on /root/test type none (rw,bind)

Cheers,
Frans Pop
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux