Skip to content

Commit f0743c2

Browse files
committed
NFSD: Remove nfsd_file::nf_hashval
The value in this field can always be computed from nf_inode, thus it is no longer used. Reviewed-by: Jeff Layton <[email protected]> Signed-off-by: Chuck Lever <[email protected]>
1 parent cb7ec76 commit f0743c2

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

fs/nfsd/filecache.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -168,8 +168,7 @@ nfsd_file_mark_find_or_create(struct nfsd_file *nf)
168168
}
169169

170170
static struct nfsd_file *
171-
nfsd_file_alloc(struct inode *inode, unsigned int may, unsigned int hashval,
172-
struct net *net)
171+
nfsd_file_alloc(struct inode *inode, unsigned int may, struct net *net)
173172
{
174173
struct nfsd_file *nf;
175174

@@ -183,7 +182,6 @@ nfsd_file_alloc(struct inode *inode, unsigned int may, unsigned int hashval,
183182
nf->nf_net = net;
184183
nf->nf_flags = 0;
185184
nf->nf_inode = inode;
186-
nf->nf_hashval = hashval;
187185
refcount_set(&nf->nf_ref, 1);
188186
nf->nf_may = may & NFSD_FILE_MAY_MASK;
189187
nf->nf_mark = NULL;
@@ -1006,7 +1004,7 @@ nfsd_do_file_acquire(struct svc_rqst *rqstp, struct svc_fh *fhp,
10061004
if (nf)
10071005
goto wait_for_construction;
10081006

1009-
new = nfsd_file_alloc(inode, may_flags, hashval, net);
1007+
new = nfsd_file_alloc(inode, may_flags, net);
10101008
if (!new) {
10111009
status = nfserr_jukebox;
10121010
goto out_status;

fs/nfsd/filecache.h

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ struct nfsd_file {
4040
#define NFSD_FILE_REFERENCED (2)
4141
unsigned long nf_flags;
4242
struct inode *nf_inode;
43-
unsigned int nf_hashval;
4443
refcount_t nf_ref;
4544
unsigned char nf_may;
4645
struct nfsd_file_mark *nf_mark;

0 commit comments

Comments
 (0)