diff options
author | J. Bruce Fields <bfields@citi.umich.edu> | 2007-06-07 17:09:49 -0400 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2007-07-18 19:14:12 -0400 |
commit | a9933cea7a1d80dd9efae9f1acd857f5dce742b9 (patch) | |
tree | d931351589579ce141110350de9ff11154328399 /fs/locks.c | |
parent | 6d5e8b05caf074ae5676ad9aaf92e381226a14a7 (diff) | |
download | op-kernel-dev-a9933cea7a1d80dd9efae9f1acd857f5dce742b9.zip op-kernel-dev-a9933cea7a1d80dd9efae9f1acd857f5dce742b9.tar.gz |
locks: rename lease functions to reflect locks.c conventions
We've been using the convention that vfs_foo is the function that calls
a filesystem-specific foo method if it exists, or falls back on a
generic method if it doesn't; thus vfs_foo is what is called when some
other part of the kernel (normally lockd or nfsd) wants to get a lock,
whereas foo is what filesystems call to use the underlying local
functionality as part of their lock implementation.
So rename setlease to vfs_setlease (which will call a
filesystem-specific setlease after a later patch) and __setlease to
setlease.
Also, vfs_setlease need only be GPL-exported as long as it's only needed
by lockd and nfsd.
Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Diffstat (limited to 'fs/locks.c')
-rw-r--r-- | fs/locks.c | 15 |
1 files changed, 7 insertions, 8 deletions
@@ -1326,7 +1326,7 @@ int fcntl_getlease(struct file *filp) } /** - * __setlease - sets a lease on an open file + * setlease - sets a lease on an open file * @filp: file pointer * @arg: type of lease to obtain * @flp: input - file_lock to use, output - file_lock inserted @@ -1336,7 +1336,7 @@ int fcntl_getlease(struct file *filp) * * Called with kernel lock held. */ -static int __setlease(struct file *filp, long arg, struct file_lock **flp) +static int setlease(struct file *filp, long arg, struct file_lock **flp) { struct file_lock *fl, **before, **my_before = NULL, *lease; struct dentry *dentry = filp->f_path.dentry; @@ -1423,7 +1423,7 @@ out: } /** - * setlease - sets a lease on an open file + * vfs_setlease - sets a lease on an open file * @filp: file pointer * @arg: type of lease to obtain * @lease: file_lock to use @@ -1432,18 +1432,17 @@ out: * The fl_lmops fl_break function is required by break_lease */ -int setlease(struct file *filp, long arg, struct file_lock **lease) +int vfs_setlease(struct file *filp, long arg, struct file_lock **lease) { int error; lock_kernel(); - error = __setlease(filp, arg, lease); + error = setlease(filp, arg, lease); unlock_kernel(); return error; } - -EXPORT_SYMBOL(setlease); +EXPORT_SYMBOL_GPL(vfs_setlease); /** * fcntl_setlease - sets a lease on an open file @@ -1469,7 +1468,7 @@ int fcntl_setlease(unsigned int fd, struct file *filp, long arg) lock_kernel(); - error = __setlease(filp, arg, &flp); + error = vfs_setlease(filp, arg, &flp); if (error || arg == F_UNLCK) goto out_unlock; |