Commit 6a0ddd15 authored by William A. Adamson's avatar William A. Adamson Committed by Linus Torvalds

[PATCH] nfs4 lease: add a lock manager release private callback

Add a lock manager release private callback to locks_free_lock() for lock
manger lease clean-up.
Signed-off-by: default avatarAndy Adamson <andros@citi.umich.edu>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 8f8d338e
......@@ -173,7 +173,12 @@ static inline void locks_free_lock(struct file_lock *fl)
fl->fl_ops->fl_release_private(fl);
fl->fl_ops = NULL;
}
fl->fl_lmops = NULL;
if (fl->fl_lmops) {
if (fl->fl_lmops->fl_release_private)
fl->fl_lmops->fl_release_private(fl);
fl->fl_lmops = NULL;
}
kmem_cache_free(filelock_cache, fl);
}
......
......@@ -634,6 +634,7 @@ struct lock_manager_operations {
int (*fl_compare_owner)(struct file_lock *, struct file_lock *);
void (*fl_notify)(struct file_lock *); /* unblock callback */
void (*fl_copy_lock)(struct file_lock *, struct file_lock *);
void (*fl_release_private)(struct file_lock *);
};
/* that will die - we need it for nfs_lock_info */
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment