]> 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>
Mon, 27 Apr 2020 13:46:02 +0000 (15:46 +0200)
commit31b3a523eca2fc7e5876ec5fd89094208fed0899
treeda0328a8656316222c56bcd0f8a83705bc0b4f7a
parent32ff1494e3bbf995199ad6d4bde911a3bab7ccf6
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