summaryrefslogtreecommitdiff
path: root/fs/locks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 15:22:57 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-06 15:22:57 -0800
commit47853e7fa588bef826c9799a87b33904b32bd905 (patch)
treebd7681d1aedf28125b86fb0218e64297f4d71ac9 /fs/locks.c
parent221fc10ec89834329e5613e3cab4569ba22da410 (diff)
parent9e56904e41e242169007e69d9916059dab995d90 (diff)
downloadlinux-3.10-47853e7fa588bef826c9799a87b33904b32bd905.tar.gz
linux-3.10-47853e7fa588bef826c9799a87b33904b32bd905.tar.bz2
linux-3.10-47853e7fa588bef826c9799a87b33904b32bd905.zip
Merge git://git.linux-nfs.org/pub/linux/nfs-2.6
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c20
1 files changed, 8 insertions, 12 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 250ef53d25e..fb32d6218e2 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -1958,22 +1958,18 @@ EXPORT_SYMBOL(posix_block_lock);
*
* lockd needs to block waiting for locks.
*/
-void
+int
posix_unblock_lock(struct file *filp, struct file_lock *waiter)
{
- /*
- * A remote machine may cancel the lock request after it's been
- * granted locally. If that happens, we need to delete the lock.
- */
+ int status = 0;
+
lock_kernel();
- if (waiter->fl_next) {
+ if (waiter->fl_next)
__locks_delete_block(waiter);
- unlock_kernel();
- } else {
- unlock_kernel();
- waiter->fl_type = F_UNLCK;
- posix_lock_file(filp, waiter);
- }
+ else
+ status = -ENOENT;
+ unlock_kernel();
+ return status;
}
EXPORT_SYMBOL(posix_unblock_lock);