diff options
-rw-r--r-- | fs/locks.c | 12 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
2 files changed, 12 insertions, 2 deletions
diff --git a/fs/locks.c b/fs/locks.c index ec9becd02d3d..5e83f3a99377 100644 --- a/fs/locks.c +++ b/fs/locks.c | |||
@@ -230,8 +230,12 @@ void locks_release_private(struct file_lock *fl) | |||
230 | fl->fl_ops->fl_release_private(fl); | 230 | fl->fl_ops->fl_release_private(fl); |
231 | fl->fl_ops = NULL; | 231 | fl->fl_ops = NULL; |
232 | } | 232 | } |
233 | fl->fl_lmops = NULL; | ||
234 | 233 | ||
234 | if (fl->fl_lmops) { | ||
235 | if (fl->fl_lmops->lm_put_owner) | ||
236 | fl->fl_lmops->lm_put_owner(fl); | ||
237 | fl->fl_lmops = NULL; | ||
238 | } | ||
235 | } | 239 | } |
236 | EXPORT_SYMBOL_GPL(locks_release_private); | 240 | EXPORT_SYMBOL_GPL(locks_release_private); |
237 | 241 | ||
@@ -274,8 +278,12 @@ static void locks_copy_private(struct file_lock *new, struct file_lock *fl) | |||
274 | fl->fl_ops->fl_copy_lock(new, fl); | 278 | fl->fl_ops->fl_copy_lock(new, fl); |
275 | new->fl_ops = fl->fl_ops; | 279 | new->fl_ops = fl->fl_ops; |
276 | } | 280 | } |
277 | if (fl->fl_lmops) | 281 | |
282 | if (fl->fl_lmops) { | ||
283 | if (fl->fl_lmops->lm_get_owner) | ||
284 | fl->fl_lmops->lm_get_owner(new, fl); | ||
278 | new->fl_lmops = fl->fl_lmops; | 285 | new->fl_lmops = fl->fl_lmops; |
286 | } | ||
279 | } | 287 | } |
280 | 288 | ||
281 | /* | 289 | /* |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 5ab86f44b697..3b07ce2698de 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -868,6 +868,8 @@ struct file_lock_operations { | |||
868 | struct lock_manager_operations { | 868 | struct lock_manager_operations { |
869 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); | 869 | int (*lm_compare_owner)(struct file_lock *, struct file_lock *); |
870 | unsigned long (*lm_owner_key)(struct file_lock *); | 870 | unsigned long (*lm_owner_key)(struct file_lock *); |
871 | void (*lm_get_owner)(struct file_lock *, struct file_lock *); | ||
872 | void (*lm_put_owner)(struct file_lock *); | ||
871 | void (*lm_notify)(struct file_lock *); /* unblock callback */ | 873 | void (*lm_notify)(struct file_lock *); /* unblock callback */ |
872 | int (*lm_grant)(struct file_lock *, int); | 874 | int (*lm_grant)(struct file_lock *, int); |
873 | void (*lm_break)(struct file_lock *); | 875 | void (*lm_break)(struct file_lock *); |