diff options
-rw-r--r-- | fs/lockd/svclock.c | 2 | ||||
-rw-r--r-- | fs/locks.c | 3 | ||||
-rw-r--r-- | include/linux/fs.h | 1 |
3 files changed, 5 insertions, 1 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index 83ee34203bd7..e577a78d7bac 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -326,6 +326,8 @@ static void nlmsvc_freegrantargs(struct nlm_rqst *call) | |||
326 | { | 326 | { |
327 | if (call->a_args.lock.oh.data != call->a_owner) | 327 | if (call->a_args.lock.oh.data != call->a_owner) |
328 | kfree(call->a_args.lock.oh.data); | 328 | kfree(call->a_args.lock.oh.data); |
329 | |||
330 | locks_release_private(&call->a_args.lock.fl); | ||
329 | } | 331 | } |
330 | 332 | ||
331 | /* | 333 | /* |
diff --git a/fs/locks.c b/fs/locks.c index ec3deea29e37..b6440f52178f 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -151,7 +151,7 @@ static struct file_lock *locks_alloc_lock(void) | |||
151 | return kmem_cache_alloc(filelock_cache, GFP_KERNEL); | 151 | return kmem_cache_alloc(filelock_cache, GFP_KERNEL); |
152 | } | 152 | } |
153 | 153 | ||
154 | static void locks_release_private(struct file_lock *fl) | 154 | void locks_release_private(struct file_lock *fl) |
155 | { | 155 | { |
156 | if (fl->fl_ops) { | 156 | if (fl->fl_ops) { |
157 | if (fl->fl_ops->fl_release_private) | 157 | if (fl->fl_ops->fl_release_private) |
@@ -165,6 +165,7 @@ static void locks_release_private(struct file_lock *fl) | |||
165 | } | 165 | } |
166 | 166 | ||
167 | } | 167 | } |
168 | EXPORT_SYMBOL_GPL(locks_release_private); | ||
168 | 169 | ||
169 | /* Free a lock which is not in use. */ | 170 | /* Free a lock which is not in use. */ |
170 | static void locks_free_lock(struct file_lock *fl) | 171 | static void locks_free_lock(struct file_lock *fl) |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5bed436f4353..5ba615e8f533 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1108,6 +1108,7 @@ extern void locks_copy_lock(struct file_lock *, struct file_lock *); | |||
1108 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); | 1108 | extern void __locks_copy_lock(struct file_lock *, const struct file_lock *); |
1109 | extern void locks_remove_posix(struct file *, fl_owner_t); | 1109 | extern void locks_remove_posix(struct file *, fl_owner_t); |
1110 | extern void locks_remove_flock(struct file *); | 1110 | extern void locks_remove_flock(struct file *); |
1111 | extern void locks_release_private(struct file_lock *); | ||
1111 | extern void posix_test_lock(struct file *, struct file_lock *); | 1112 | extern void posix_test_lock(struct file *, struct file_lock *); |
1112 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); | 1113 | extern int posix_lock_file(struct file *, struct file_lock *, struct file_lock *); |
1113 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 1114 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |