aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svclock.c
diff options
context:
space:
mode:
authorMarc Eshel <eshel@almaden.ibm.com>2007-01-18 16:15:35 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2007-05-06 19:23:24 -0400
commit150b393456e5a23513cace286a019e87151e47f0 (patch)
tree91599ec9b759f7e3c5defcb8dd361acd7288154c /fs/lockd/svclock.c
parent7723ec9777d9832849b76475b1a21a2872a40d20 (diff)
locks: allow {vfs,posix}_lock_file to return conflicting lock
The nfsv4 protocol's lock operation, in the case of a conflict, returns information about the conflicting lock. It's unclear how clients can use this, so for now we're not going so far as to add a filesystem method that can return a conflicting lock, but we may as well return something in the local case when it's easy to. Signed-off-by: Marc Eshel <eshel@almaden.ibm.com> Signed-off-by: "J. Bruce Fields" <bfields@citi.umich.edu>
Diffstat (limited to 'fs/lockd/svclock.c')
-rw-r--r--fs/lockd/svclock.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/lockd/svclock.c b/fs/lockd/svclock.c
index 97b0160ef10f..3b0e7a4b817b 100644
--- a/fs/lockd/svclock.c
+++ b/fs/lockd/svclock.c
@@ -363,7 +363,7 @@ again:
363 } else 363 } else
364 lock = &block->b_call->a_args.lock; 364 lock = &block->b_call->a_args.lock;
365 365
366 error = posix_lock_file(file->f_file, &lock->fl); 366 error = posix_lock_file(file->f_file, &lock->fl, NULL);
367 lock->fl.fl_flags &= ~FL_SLEEP; 367 lock->fl.fl_flags &= ~FL_SLEEP;
368 368
369 dprintk("lockd: posix_lock_file returned %d\n", error); 369 dprintk("lockd: posix_lock_file returned %d\n", error);
@@ -467,7 +467,7 @@ nlmsvc_unlock(struct nlm_file *file, struct nlm_lock *lock)
467 nlmsvc_cancel_blocked(file, lock); 467 nlmsvc_cancel_blocked(file, lock);
468 468
469 lock->fl.fl_type = F_UNLCK; 469 lock->fl.fl_type = F_UNLCK;
470 error = posix_lock_file(file->f_file, &lock->fl); 470 error = posix_lock_file(file->f_file, &lock->fl, NULL);
471 471
472 return (error < 0)? nlm_lck_denied_nolocks : nlm_granted; 472 return (error < 0)? nlm_lck_denied_nolocks : nlm_granted;
473} 473}
@@ -569,7 +569,7 @@ nlmsvc_grant_blocked(struct nlm_block *block)
569 569
570 /* Try the lock operation again */ 570 /* Try the lock operation again */
571 lock->fl.fl_flags |= FL_SLEEP; 571 lock->fl.fl_flags |= FL_SLEEP;
572 error = posix_lock_file(file->f_file, &lock->fl); 572 error = posix_lock_file(file->f_file, &lock->fl, NULL);
573 lock->fl.fl_flags &= ~FL_SLEEP; 573 lock->fl.fl_flags &= ~FL_SLEEP;
574 574
575 switch (error) { 575 switch (error) {