Skip to contentSkip to conversation

RESEND lease interfaces for version 4 NFSD

PATCH New Andy Adamson 1 participant 1 message Sep 21, 2004

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 RESEND lease interfaces for version 4 NFSD

VFS: add a lock manager release private callback to locks_free_lock() for lock manger lease clean-up.

---

 linux-2.6.9-rc2-andros/fs/locks.c         |    7 ++++++-
 linux-2.6.9-rc2-andros/include/linux/fs.h |    1 +
 2 files changed, 7 insertions(+), 1 deletion(-)
fs/locks.c renamed from fs/locks.c~lmops-release-priv +6 -1
diff -puN fs/locks.c~lmops-release-priv fs/locks.c
@@ -172,7 +172,12 @@ static inline void locks_free_lock(struc
 			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);
 }
include/linux/fs.h renamed from include/linux/fs.h~lmops-release-priv +1 -0
diff -puN include/linux/fs.h~lmops-release-priv include/linux/fs.h
@@ -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 */

_