Lines Matching defs:lease

107 		.procname	= "lease-break-time",
518 /* default lease lock manager operations */
550 * Initialize a lease, use the default lock manager operations
569 /* Allocate a file_lock initialised to this type of lease */
1388 /* We already had a lease on this file; just change its type */
1437 static bool leases_conflict(struct file_lock *lease, struct file_lock *breaker)
1441 if (lease->fl_lmops->lm_breaker_owns_lease
1442 && lease->fl_lmops->lm_breaker_owns_lease(lease))
1444 if ((breaker->fl_flags & FL_LAYOUT) != (lease->fl_flags & FL_LAYOUT)) {
1448 if ((breaker->fl_flags & FL_DELEG) && (lease->fl_flags & FL_LEASE)) {
1453 rc = locks_conflict(breaker, lease);
1455 trace_leases_conflict(rc, lease, breaker);
1483 * some kind of lock (maybe a lease) on this file. Leases are broken on
1573 * Wait for the next conflicting lease that has not been
1593 * lease_get_mtime - update modified time of an inode with exclusive lease
1599 * exclusive lease, then they could be modifying it.
1623 * fcntl_getlease - Enquire what lease is currently active
1627 * (if no lease break is pending):
1629 * %F_RDLCK to indicate a shared lease is held.
1631 * %F_WRLCK to indicate an exclusive lease is held.
1633 * %F_UNLCK to indicate no lease is held.
1635 * (if a lease break is pending):
1637 * %F_RDLCK to indicate an exclusive lease needs to be
1638 * changed to a shared lease (or removed).
1640 * %F_UNLCK to indicate the lease needs to be removed.
1675 * desired lease.
1677 * @arg: type of lease that we're trying to acquire
1681 * conflict with the lease we're trying to set.
1701 * Make sure that only read/write count is from lease requestor.
1721 struct file_lock *fl, *my_fl = NULL, *lease;
1728 lease = *flp;
1729 trace_generic_add_lease(inode, lease);
1750 error = check_conflicting_open(filp, arg, lease->fl_flags);
1756 * lease on this file, then we hold it on this filp
1758 * And if we are trying to acquire an exclusive lease,
1765 fl->fl_owner == lease->fl_owner) {
1771 * No exclusive leases if someone else has a lease on
1777 * Modifying our existing lease is OK, but no getting a
1778 * new lease if someone else is opening for write:
1785 lease = my_fl;
1786 error = lease->fl_lmops->lm_change(lease, arg, &dispose);
1796 locks_insert_lock_ctx(lease, &ctx->flc_lease);
1800 * open but before the lease was inserted. Check again for a
1801 * conflicting open and cancel the lease if there is one.
1807 error = check_conflicting_open(filp, arg, lease->fl_flags);
1809 locks_unlink_lock_ctx(lease);
1814 if (lease->fl_lmops->lm_setup)
1815 lease->fl_lmops->lm_setup(lease, priv);
1860 * generic_setlease - sets a lease on an open file
1862 * @arg: type of lease to obtain
1904 * a new lease with the lease_notifier_chain. This is used by (e.g.) nfsd
1906 * conflicting lease.
1917 setlease_notifier(int arg, struct file_lock *lease)
1920 srcu_notifier_call_chain(&lease_notifier_chain, arg, lease);
1936 * vfs_setlease - sets a lease on an open file
1938 * @arg: type of lease to obtain
1939 * @lease: file_lock to use when adding a lease
1940 * @priv: private info for lm_setup when adding a lease (may be
1943 * Call this to establish a lease on the file. The "lease" argument is not
1945 * an existing lease, the ``(*lease)->fl_lmops->lm_break`` operation must be
1953 vfs_setlease(struct file *filp, int arg, struct file_lock **lease, void **priv)
1955 if (lease)
1956 setlease_notifier(arg, *lease);
1958 return filp->f_op->setlease(filp, arg, lease, priv);
1960 return generic_setlease(filp, arg, lease, priv);
1990 * fcntl_setlease - sets a lease on an open file
1993 * @arg: type of lease to obtain
1995 * Call this fcntl to establish a lease on the file.
1997 * receive a signal when the lease is broken.