diff options
author | Felix Blyakher <felixb@sgi.com> | 2009-03-31 15:12:56 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2009-04-24 16:36:03 -0400 |
commit | a9e61e25f9d2e7e43bf17625f5cb56c9e0a89b17 (patch) | |
tree | 1c000afc1e2eadb00570ae34666af508afa021fe /fs/lockd/svclock.c | |
parent | 80492e7d49bee0a280a84a39075a7857b92836b2 (diff) | |
download | op-kernel-dev-a9e61e25f9d2e7e43bf17625f5cb56c9e0a89b17.zip op-kernel-dev-a9e61e25f9d2e7e43bf17625f5cb56c9e0a89b17.tar.gz |
lockd: call locks_release_private to cleanup per-filesystem state
For every lock request lockd creates a new file_lock object
in nlmsvc_setgrantargs() by copying the passed in file_lock with
locks_copy_lock(). A filesystem can attach it's own lock_operations
vector to the file_lock. It has to be cleaned up at the end of the
file_lock's life. However, lockd doesn't do it today, yet it
asserts in nlmclnt_release_lockargs() that the per-filesystem
state is clean.
This patch fixes it by exporting locks_release_private() and adding
it to nlmsvc_freegrantargs(), to be symmetrical to creating a
file_lock in nlmsvc_setgrantargs().
Signed-off-by: Felix Blyakher <felixb@sgi.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/svclock.c')
-rw-r--r-- | fs/lockd/svclock.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 83ee342..e577a78 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c @@ -326,6 +326,8 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call) { if (call->a_args.lock.oh.data != call->a_owner) kfree(call->a_args.lock.oh.data); + + locks_release_private(&call->a_args.lock.fl); } /* |