OSDN Git Service

NFSD: Add a nfsd4_file_hash_remove() helper
authorChuck Lever <chuck.lever@oracle.com>
Fri, 28 Oct 2022 14:47:34 +0000 (10:47 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 28 Nov 2022 17:54:47 +0000 (12:54 -0500)
commit3341678f2fd6106055cead09e513fad6950a0d19
tree4237eb5856aee9d88f5f049e2afe240fe21b8f79
parent81a21fa3e7fdecb3c5b97014f0fc5a17d5806cae
NFSD: Add a nfsd4_file_hash_remove() helper

Refactor to relocate hash deletion operation to a helper function
that is close to most other nfs4_file data structure operations.

The "noinline" annotation will become useful in a moment when the
hlist_del_rcu() is replaced with a more complex rhash remove
operation. It also guarantees that hash remove operations can be
traced with "-p function -l remove_nfs4_file_locked".

This also simplifies the organization of forward declarations: the
to-be-added rhashtable and its param structure will be defined
/after/ put_nfs4_file().

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