summaryrefslogtreecommitdiffstats
path: root/fs/nfs
diff options
context:
space:
mode:
authorMarc Eshel <eshel@almaden.ibm.com>2007-02-21 00:55:18 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2007-05-06 17:39:00 -0400
commit9d6a8c5c213e34c475e72b245a8eb709258e968c (patch)
tree96110535c2bd9485129c0753a9e0f012083b220f /fs/nfs
parent70cc6487a4e08b8698c0e2ec935fb48d10490162 (diff)
downloadlinux-9d6a8c5c213e34c475e72b245a8eb709258e968c.tar.gz
linux-9d6a8c5c213e34c475e72b245a8eb709258e968c.tar.bz2
linux-9d6a8c5c213e34c475e72b245a8eb709258e968c.zip
locks: give posix_test_lock same interface as ->lock
posix_test_lock() and ->lock() do the same job but have gratuitously different interfaces. Modify posix_test_lock() so the two agree, simplifying some code in the process. Signed-off-by: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Diffstat (limited to 'fs/nfs')
-rw-r--r--fs/nfs/file.c7
1 files changed, 1 insertions, 6 deletions
diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index 8e66b5a2d490..5eaee6dd040b 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -391,17 +391,12 @@ out_swapfile:
static int do_getlk(struct file *filp, int cmd, struct file_lock *fl)
{
- struct file_lock cfl;
struct inode *inode = filp->f_mapping->host;
int status = 0;
lock_kernel();
/* Try local locking first */
- if (posix_test_lock(filp, fl, &cfl)) {
- fl->fl_start = cfl.fl_start;
- fl->fl_end = cfl.fl_end;
- fl->fl_type = cfl.fl_type;
- fl->fl_pid = cfl.fl_pid;
+ if (posix_test_lock(filp, fl)) {
goto out;
}