Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 267160
b: refs/heads/master
c: ee626a7
h: refs/heads/master
v: v3
  • Loading branch information
J. Bruce Fields committed Sep 13, 2011
1 parent f84c8c4 commit f7ac1b5
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 69064a2764fe195f1478be3ea83d15abe5d71025
refs/heads/master: ee626a77d3725a129391b1c85edd46f3b470cca9
8 changes: 4 additions & 4 deletions trunk/fs/nfsd/nfs4state.c
Original file line number Diff line number Diff line change
Expand Up @@ -168,9 +168,9 @@ static unsigned int file_hashval(struct inode *ino)
return hash_ptr(ino, FILE_HASH_BITS);
}

static unsigned int stateid_hashval(u32 owner_id, u32 file_id)
static unsigned int stateid_hashval(stateid_t *s)
{
return (owner_id + file_id) & STATEID_HASH_MASK;
return opaque_hashval(&s->si_opaque, sizeof(stateid_opaque_t)) & STATEID_HASH_MASK;
}

static struct list_head file_hashtbl[FILE_HASH_SIZE];
Expand Down Expand Up @@ -221,7 +221,7 @@ static inline void hash_stid(struct nfs4_stid *stid)
stateid_t *s = &stid->sc_stateid;
unsigned int hashval;

hashval = stateid_hashval(s->si_stateownerid, s->si_fileid);
hashval = stateid_hashval(s);
list_add(&stid->sc_hash, &stateid_hashtbl[hashval]);
}

Expand Down Expand Up @@ -1083,7 +1083,7 @@ static struct nfs4_stid *find_stateid(stateid_t *t)
struct nfs4_stid *s;
unsigned int hashval;

hashval = stateid_hashval(t->si_stateownerid, t->si_fileid);
hashval = stateid_hashval(t);
list_for_each_entry(s, &stateid_hashtbl[hashval], sc_hash)
if (same_stateid(&s->sc_stateid, t))
return s;
Expand Down

0 comments on commit f7ac1b5

Please sign in to comment.