cifs: serialize all mount attempts
authorRonnie Sahlberg <lsahlber@redhat.com>
Tue, 18 Jan 2022 02:16:57 +0000 (12:16 +1000)
committerSteve French <stfrench@microsoft.com>
Tue, 18 Jan 2022 06:10:03 +0000 (00:10 -0600)
commit5455b9ecaf231ec5c6b0cd5c6076eb64c9dbc9aa
tree2d94649b45e5f2ab110ee192fa5b77458018de1e
parenta2809d0e16963fdf3984409e47f145cccb0c6821
cifs: serialize all mount attempts

RHBZ: 2008434

Some servers, such as Windows2016 have a very low number of concurrent mounts that
they allow from each client.
This can be a problem if you have a more than a handful (==3 in this case)
of cifs entries in your fstab and cause a number of the mounts there to randomly fail.

Add a global mutex and use it to serialize all mount attempts.

Signed-off-by: Ronnie Sahlberg <lsahlber@redhat.com>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/fs_context.c