OSDN Git Service

NFSD: Clean up nfsd4_init_file()
authorChuck Lever <chuck.lever@oracle.com>
Fri, 28 Oct 2022 14:47:28 +0000 (10:47 -0400)
committerChuck Lever <chuck.lever@oracle.com>
Mon, 28 Nov 2022 17:54:46 +0000 (12:54 -0500)
commit81a21fa3e7fdecb3c5b97014f0fc5a17d5806cae
treeb73bb1a97aeff18d489394f3c51f7b37a0e04d25
parent3fe828caddd81e68e9d29353c6e9285a658ca056
NFSD: Clean up nfsd4_init_file()

Name this function more consistently. I'm going to use nfsd4_file_
and nfsd4_file_hash_ for these helpers.

Change the @fh parameter to be const pointer for better type safety.

Finally, move the hash insertion operation to the caller. This is
typical for most other "init_object" type helpers, and it is where
most of the other nfs4_file hash table operations are located.

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