]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: fix mount -a EBUSY for cifs
authorRoberto Bergantinos Corpas <rbergant@redhat.com>
Mon, 27 Apr 2020 13:46:02 +0000 (15:46 +0200)
committerKarel Zak <kzak@redhat.com>
Fri, 15 May 2020 10:21:21 +0000 (12:21 +0200)
commitdcc86fef842e3fa978985e0b4982180da4b5faf5
treed37c39e994645b7c4002926fc1805e76b4c307f1
parentf08432038c20ca0674fb2e3134938a742ee65807
libmount: fix mount -a EBUSY for cifs

fstab:

 //rhel73/myshare/sub/path  /mnt   cifs

after mount in mountinfo:

 #  grep cifs /proc/self/mountinfo
 47 39 0:40 /sub/path /mnt rw,relatime shared:60 - cifs //rhel73/myshare/sub/path ...
            ^^^^^^^^^
or:

 # grep cifs /proc/self/mountinfo
 47 39 0:40 / /mnt rw,relatime shared:60 - cifs //rhel73/myshare/sub/path ...
            ^

That is so since on kernel cifs code, cifs_get_root (which returns the
entry associated with mnt_root) return s_root if
CIFS_MOUNT_USE_PREFIX_PATH is set, no questions asked.

This situation can occurr often on CIFS mounts, as CIFS servers limit
frequently scope of access to the root path.

[kzak@redhat.com: - add more info to the commit message,
                  - clean up variable names]

Addresses: https://bugzilla.redhat.com/show_bug.cgi?id=1826719
Signed-off-by: Roberto Bergantinos Corpas <rbergant@redhat.com>
Signed-off-by: Karel Zak <kzak@redhat.com>
libmount/src/tab.c