aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorJeff Layton <jlayton@primarydata.com>2014-08-22 18:13:28 -0400
committerJeff Layton <jlayton@primarydata.com>2014-10-07 14:06:12 -0400
commite51673aa5d9a8c75cc836fac687fa4dde9a76182 (patch)
treea39a9b8c00e03909316f0c1c9faed73c2ee585c7 /fs/locks.c
parent0efaa7e82f02fe69c05ad28e905f31fc86e6f08e (diff)
locks: clean up vfs_setlease kerneldoc comments
Some of the latter paragraphs seem ambiguous and just plain wrong. In particular the break_lease comment makes no sense. We call break_lease (and break_deleg) from all sorts of vfs-layer functions, so there is clearly such a method. Also get rid of some of the other comments about what's needed for a full implementation. Signed-off-by: Jeff Layton <jlayton@primarydata.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c34
1 files changed, 10 insertions, 24 deletions
diff --git a/fs/locks.c b/fs/locks.c
index f79c74ef51ef..e16c2c61a44f 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1708,30 +1708,16 @@ static int __vfs_setlease(struct file *filp, long arg, struct file_lock **lease)
1708} 1708}
1709 1709
1710/** 1710/**
1711 * vfs_setlease - sets a lease on an open file 1711 * vfs_setlease - sets a lease on an open file
1712 * @filp: file pointer 1712 * @filp: file pointer
1713 * @arg: type of lease to obtain 1713 * @arg: type of lease to obtain
1714 * @lease: file_lock to use 1714 * @lease: file_lock to use when adding a lease
1715 * 1715 *
1716 * Call this to establish a lease on the file. 1716 * Call this to establish a lease on the file. The "lease" argument is not
1717 * The (*lease)->fl_lmops->lm_break operation must be set; if not, 1717 * used for F_UNLCK requests and may be NULL. For commands that set or alter
1718 * break_lease will oops! 1718 * an existing lease, the (*lease)->fl_lmops->lm_break operation must be set;
1719 * 1719 * if not, this function will return -ENOLCK (and generate a scary-looking
1720 * This will call the filesystem's setlease file method, if 1720 * stack trace).
1721 * defined. Note that there is no getlease method; instead, the
1722 * filesystem setlease method should call back to setlease() to
1723 * add a lease to the inode's lease list, where fcntl_getlease() can
1724 * find it. Since fcntl_getlease() only reports whether the current
1725 * task holds a lease, a cluster filesystem need only do this for
1726 * leases held by processes on this node.
1727 *
1728 * There is also no break_lease method; filesystems that
1729 * handle their own leases should break leases themselves from the
1730 * filesystem's open, create, and (on truncate) setattr methods.
1731 *
1732 * Warning: the only current setlease methods exist only to disable
1733 * leases in certain cases. More vfs changes may be required to
1734 * allow a full filesystem lease implementation.
1735 */ 1721 */
1736 1722
1737int vfs_setlease(struct file *filp, long arg, struct file_lock **lease) 1723int vfs_setlease(struct file *filp, long arg, struct file_lock **lease)