]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
NFSD: Remove nfsd_file::nf_hashval
authorChuck Lever <chuck.lever@oracle.com>
Fri, 8 Jul 2022 18:26:10 +0000 (14:26 -0400)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 10 Apr 2024 14:19:10 +0000 (16:19 +0200)
[ Upstream commit f0743c2b25c65debd4f599a7c861428cd9de5906 ]

The value in this field can always be computed from nf_inode, thus
it is no longer used.

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

index dd59deec8b011f3b279d32abd41e51c0e35d0050..29b1f57692a60a0a96787737058f5be13d920ac0 100644 (file)
@@ -167,8 +167,7 @@ nfsd_file_mark_find_or_create(struct nfsd_file *nf)
 }
 
 static struct nfsd_file *
-nfsd_file_alloc(struct inode *inode, unsigned int may, unsigned int hashval,
-               struct net *net)
+nfsd_file_alloc(struct inode *inode, unsigned int may, struct net *net)
 {
        struct nfsd_file *nf;
 
@@ -182,7 +181,6 @@ nfsd_file_alloc(struct inode *inode, unsigned int may, unsigned int hashval,
                nf->nf_net = net;
                nf->nf_flags = 0;
                nf->nf_inode = inode;
-               nf->nf_hashval = hashval;
                refcount_set(&nf->nf_ref, 1);
                nf->nf_may = may & NFSD_FILE_MAY_MASK;
                nf->nf_mark = NULL;
@@ -1005,7 +1003,7 @@ retry:
        if (nf)
                goto wait_for_construction;
 
-       new = nfsd_file_alloc(inode, may_flags, hashval, net);
+       new = nfsd_file_alloc(inode, may_flags, net);
        if (!new) {
                status = nfserr_jukebox;
                goto out_status;
index c6ad5fe47f12f0bd11f7b332df00e2dc51a2af97..82051e1b8420d6eaa461d3890289f9d83292a47a 100644 (file)
@@ -40,7 +40,6 @@ struct nfsd_file {
 #define NFSD_FILE_REFERENCED   (2)
        unsigned long           nf_flags;
        struct inode            *nf_inode;
-       unsigned int            nf_hashval;
        refcount_t              nf_ref;
        unsigned char           nf_may;
        struct nfsd_file_mark   *nf_mark;