]> git.baikalelectronics.ru Git - kernel.git/commit
NFSD: Replace the "init once" mechanism
authorChuck Lever <chuck.lever@oracle.com>
Fri, 8 Jul 2022 18:26:16 +0000 (14:26 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Sat, 30 Jul 2022 00:12:01 +0000 (20:12 -0400)
commit863c833c53abdefcb742a750298e25e5f3a4c3fa
tree58bbb17d42e46bcd1e7f7b861306ccc80ce4bbe7
parent09f12311dc8248e4396d51977c95e2adfc5ecc19
NFSD: Replace the "init once" mechanism

In a moment, the nfsd_file_hashtbl global will be replaced with an
rhashtable. Replace the one or two spots that need to check if the
hash table is available. We can easily reuse the SHUTDOWN flag for
this purpose.

Document that this mechanism relies on callers to hold the
nfsd_mutex to prevent init, shutdown, and purging to run
concurrently.

Reviewed-by: Jeff Layton <jlayton@kernel.org>
Signed-off-by: Chuck Lever <chuck.lever@oracle.com>
fs/nfsd/filecache.c