Commit 52283cc5 authored by Neil Brown's avatar Neil Brown Committed by Linus Torvalds

[PATCH] nfsd4: keep lockowners off perclient list

There's no reason to have the lockowners hang off the same list on the client
struct as the openowners do; you can always get to the lockowners from their
original openowners instead.
Signed-off-by: default avatarJ. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: default avatarNeil Brown <neilb@cse.unsw.edu.au>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 75ca5e6d
...@@ -1109,9 +1109,11 @@ unhash_stateowner(struct nfs4_stateowner *sop) ...@@ -1109,9 +1109,11 @@ unhash_stateowner(struct nfs4_stateowner *sop)
list_del(&sop->so_idhash); list_del(&sop->so_idhash);
list_del(&sop->so_strhash); list_del(&sop->so_strhash);
if (sop->so_is_open_owner) {
list_del(&sop->so_perclient); list_del(&sop->so_perclient);
list_del(&sop->so_perlockowner);
del_perclient++; del_perclient++;
}
list_del(&sop->so_perlockowner);
while (!list_empty(&sop->so_perfilestate)) { while (!list_empty(&sop->so_perfilestate)) {
stp = list_entry(sop->so_perfilestate.next, stp = list_entry(sop->so_perfilestate.next,
struct nfs4_stateid, st_perfilestate); struct nfs4_stateid, st_perfilestate);
...@@ -2575,9 +2577,7 @@ alloc_init_lock_stateowner(unsigned int strhashval, struct nfs4_client *clp, str ...@@ -2575,9 +2577,7 @@ alloc_init_lock_stateowner(unsigned int strhashval, struct nfs4_client *clp, str
sop->so_time = 0; sop->so_time = 0;
list_add(&sop->so_idhash, &lock_ownerid_hashtbl[idhashval]); list_add(&sop->so_idhash, &lock_ownerid_hashtbl[idhashval]);
list_add(&sop->so_strhash, &lock_ownerstr_hashtbl[strhashval]); list_add(&sop->so_strhash, &lock_ownerstr_hashtbl[strhashval]);
list_add(&sop->so_perclient, &clp->cl_perclient);
list_add(&sop->so_perlockowner, &open_stp->st_perlockowner); list_add(&sop->so_perlockowner, &open_stp->st_perlockowner);
add_perclient++;
sop->so_is_open_owner = 0; sop->so_is_open_owner = 0;
sop->so_id = current_ownerid++; sop->so_id = current_ownerid++;
sop->so_client = clp; sop->so_client = clp;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment