summaryrefslogtreecommitdiff
path: root/fs/gfs2/locking
diff options
context:
space:
mode:
authorMarc Eshel <eshel@almaden.ibm.com>2007-02-21 08:55:18 +0300
committerJ. Bruce Fields <bfields@citi.umich.edu>2007-05-07 01:39:00 +0400
commit9d6a8c5c213e34c475e72b245a8eb709258e968c (patch)
tree96110535c2bd9485129c0753a9e0f012083b220f /fs/gfs2/locking
parent70cc6487a4e08b8698c0e2ec935fb48d10490162 (diff)
downloadlinux-9d6a8c5c213e34c475e72b245a8eb709258e968c.tar.xz
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/gfs2/locking')
-rw-r--r--fs/gfs2/locking/nolock/main.c8
1 files changed, 1 insertions, 7 deletions
diff --git a/fs/gfs2/locking/nolock/main.c b/fs/gfs2/locking/nolock/main.c
index acfbc941f319..5cc1dfa7944a 100644
--- a/fs/gfs2/locking/nolock/main.c
+++ b/fs/gfs2/locking/nolock/main.c
@@ -164,13 +164,7 @@ static void nolock_unhold_lvb(void *lock, char *lvb)
static int nolock_plock_get(void *lockspace, struct lm_lockname *name,
struct file *file, struct file_lock *fl)
{
- struct file_lock tmp;
- int ret;
-
- ret = posix_test_lock(file, fl, &tmp);
- fl->fl_type = F_UNLCK;
- if (ret)
- memcpy(fl, &tmp, sizeof(struct file_lock));
+ posix_test_lock(file, fl);
return 0;
}