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/lockd | |
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/lockd')
-rw-r--r-- | fs/lockd/svclock.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c index cf51f849e76c..97b0160ef10f 100644 --- a/fs/lockd/svclock.c +++ b/fs/lockd/svclock.c | |||
@@ -426,15 +426,18 @@ nlmsvc_testlock(struct nlm_file *file, struct nlm_lock *lock, | |||
426 | (long long)lock->fl.fl_start, | 426 | (long long)lock->fl.fl_start, |
427 | (long long)lock->fl.fl_end); | 427 | (long long)lock->fl.fl_end); |
428 | 428 | ||
429 | if (posix_test_lock(file->f_file, &lock->fl, &conflock->fl)) { | 429 | if (posix_test_lock(file->f_file, &lock->fl)) { |
430 | dprintk("lockd: conflicting lock(ty=%d, %Ld-%Ld)\n", | 430 | dprintk("lockd: conflicting lock(ty=%d, %Ld-%Ld)\n", |
431 | conflock->fl.fl_type, | 431 | lock->fl.fl_type, |
432 | (long long)conflock->fl.fl_start, | 432 | (long long)lock->fl.fl_start, |
433 | (long long)conflock->fl.fl_end); | 433 | (long long)lock->fl.fl_end); |
434 | conflock->caller = "somehost"; /* FIXME */ | 434 | conflock->caller = "somehost"; /* FIXME */ |
435 | conflock->len = strlen(conflock->caller); | 435 | conflock->len = strlen(conflock->caller); |
436 | conflock->oh.len = 0; /* don't return OH info */ | 436 | conflock->oh.len = 0; /* don't return OH info */ |
437 | conflock->svid = conflock->fl.fl_pid; | 437 | conflock->svid = lock->fl.fl_pid; |
438 | conflock->fl.fl_type = lock->fl.fl_type; | ||
439 | conflock->fl.fl_start = lock->fl.fl_start; | ||
440 | conflock->fl.fl_end = lock->fl.fl_end; | ||
438 | return nlm_lck_denied; | 441 | return nlm_lck_denied; |
439 | } | 442 | } |
440 | 443 | ||