diff options
author | Marc Eshel <eshel@almaden.ibm.com> | 2007-02-21 00:55:18 -0500 |
---|---|---|
committer | J. Bruce Fields <bfields@citi.umich.edu> | 2007-05-06 17:39:00 -0400 |
commit | 9d6a8c5c213e34c475e72b245a8eb709258e968c (patch) | |
tree | 96110535c2bd9485129c0753a9e0f012083b220f /fs/nfs/file.c | |
parent | 70cc6487a4e08b8698c0e2ec935fb48d10490162 (diff) |
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/file.c')
-rw-r--r-- | fs/nfs/file.c | 7 |
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: | |||
391 | 391 | ||
392 | static int do_getlk(struct file *filp, int cmd, struct file_lock *fl) | 392 | static int do_getlk(struct file *filp, int cmd, struct file_lock *fl) |
393 | { | 393 | { |
394 | struct file_lock cfl; | ||
395 | struct inode *inode = filp->f_mapping->host; | 394 | struct inode *inode = filp->f_mapping->host; |
396 | int status = 0; | 395 | int status = 0; |
397 | 396 | ||
398 | lock_kernel(); | 397 | lock_kernel(); |
399 | /* Try local locking first */ | 398 | /* Try local locking first */ |
400 | if (posix_test_lock(filp, fl, &cfl)) { | 399 | if (posix_test_lock(filp, fl)) { |
401 | fl->fl_start = cfl.fl_start; | ||
402 | fl->fl_end = cfl.fl_end; | ||
403 | fl->fl_type = cfl.fl_type; | ||
404 | fl->fl_pid = cfl.fl_pid; | ||
405 | goto out; | 400 | goto out; |
406 | } | 401 | } |
407 | 402 | ||