}
#endif
+/* default lease lock manager operations */
+static void lease_break_callback(struct file_lock *fl)
+{
+ kill_fasync(&fl->fl_fasync, SIGIO, POLL_MSG);
+}
+
+struct lock_manager_operations lease_manager_ops = {
+ .fl_break = lease_break_callback,
+};
+
/* Allocate a file_lock initialised to this type of lease */
static int lease_alloc(struct file *filp, int type, struct file_lock **flp)
{
if (fl->fl_type != future) {
fl->fl_type = future;
fl->fl_break_time = break_time;
- kill_fasync(&fl->fl_fasync, SIGIO, POLL_MSG);
+ if (fl->fl_lmops && fl->fl_lmops->fl_break)
+ fl->fl_lmops->fl_break(fl);
+ else /* lease must have lmops break callback */
+ BUG();
}
}
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 *);
+ void (*fl_break)(struct file_lock *);
};
/* that will die - we need it for nfs_lock_info */