OSDN Git Service

nfsd: clean up lockowner refcounting when finding them
authorJeff Layton <jlayton@primarydata.com>
Wed, 30 Jul 2014 01:34:28 +0000 (21:34 -0400)
committerJ. Bruce Fields <bfields@redhat.com>
Thu, 31 Jul 2014 18:20:20 +0000 (14:20 -0400)
commit5db1c03feb00a72846927172d81744790e601b97
tree19036319894decca0a9def124bcbc54709e41296
parent58fb12e6a42f30adf209f8f41385a3bbb2c82420
nfsd: clean up lockowner refcounting when finding them

Ensure that when finding or creating a lockowner, that we get a
reference to it. For now, we also take an extra reference when a
lockowner is created that can be put when release_lockowner is called,
but we'll remove that in a later patch once we change how references are
held.

Since we no longer destroy lockowners in the event of an error in
nfsd4_lock, we must change how the seqid gets bumped in the lk_is_new
case. Instead of doing so on creation, do it manually in nfsd4_lock.

Signed-off-by: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: J. Bruce Fields <bfields@redhat.com>
fs/nfsd/nfs4state.c