cifs: Avoid doing network I/O while holding cache lock
authorPaulo Alcantara (SUSE) <pc@cjr.nz>
Wed, 4 Dec 2019 20:38:03 +0000 (17:38 -0300)
committerSteve French <stfrench@microsoft.com>
Mon, 27 Jan 2020 01:24:16 +0000 (19:24 -0600)
commit742d8de0186e9f8ec469f8171ea25781a17421bf
treeedc737c32111de73c7d1b75eb936bd97877a39b0
parent06d57378bcc9b2c33640945174842115593795d1
cifs: Avoid doing network I/O while holding cache lock

When creating or updating a cache entry, we need to get an DFS
referral (get_dfs_referral), so avoid holding any locks during such
network operation.

To prevent that, do the following:
* change cache hashtable sync method from RCU sync to a read/write
  lock.
* use GFP_ATOMIC in memory allocations.

Signed-off-by: Paulo Alcantara (SUSE) <pc@cjr.nz>
Signed-off-by: Steve French <stfrench@microsoft.com>
fs/cifs/dfs_cache.c