]> git.ipfire.org Git - thirdparty/util-linux.git/commit
umount: support over-mounts for --recursive
authorKarel Zak <kzak@redhat.com>
Mon, 22 Mar 2021 10:29:28 +0000 (11:29 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 22 Mar 2021 10:29:28 +0000 (11:29 +0100)
commite2f6c9eaa2deb019ba2a9dad495881b20e797f91
tree508175a7bbbde10760058af590a6418cc1bf13ba
parenta6055682811bac0dc5c6219bfde03c53290ad142
umount: support over-mounts for --recursive

For example for hierarchy:

  $ findmnt -oTARGET,ID,PARENT
  TARGET                      ID PARENT
  /mnt/A                     802     62
  └─/mnt/A/B                 937    802
    ├─/mnt/A/B/C             964    937
    │ └─/mnt/A/B/C           991    964
    └─/mnt/A/B              1018    937
      └─/mnt/A/B            1045   1018

we need umount in order (id): 1045, 1018, 991, 964, 937, 802. The current
code first tries 991 in 937 branch.

Reported-by: Lennart Poettering <lennart@poettering.net>
Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/umount.8
sys-utils/umount.c