mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-29 03:01:39 -04:00
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 <[email protected]> Signed-off-by: J. Bruce Fields <[email protected]>
This commit is contained in:
parent
80492e7d49
commit
a9e61e25f9
3 changed files with 5 additions and 1 deletions
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in a new issue