diff options
author | J. Bruce Fields <bfields@fieldses.org> | 2006-01-03 03:55:46 -0500 |
---|---|---|
committer | Trond Myklebust <Trond.Myklebust@netapp.com> | 2006-01-06 14:58:54 -0500 |
commit | 64a318ee2af9000df482d7a125c3b3e1f1007404 (patch) | |
tree | 7b39e558cccce484635dc847a016bbcb5e83abdb /include | |
parent | 2c5acd2e1a73cad59203a1bace21e6b03f2920a9 (diff) |
NLM: Further cancel fixes
If the server receives an NLM cancel call and finds no waiting lock to
cancel, then chances are the lock has already been applied, and the client
just hadn't yet processed the NLM granted callback before it sent the
cancel.
The Open Group text, for example, perimts a server to return either success
(LCK_GRANTED) or failure (LCK_DENIED) in this case. But returning an error
seems more helpful; the client may be able to use it to recognize that a
race has occurred and to recover from the race.
So, modify the relevant functions to return an error in this case.
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
Signed-off-by: Trond Myklebust <Trond.Myklebust@netapp.com>
Diffstat (limited to 'include')
-rw-r--r-- | include/linux/fs.h | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/fs.h b/include/linux/fs.h index 115e72be25d0..2c9c48d65630 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -760,7 +760,7 @@ extern struct file_lock *posix_test_lock(struct file *, struct file_lock *); | |||
760 | extern int posix_lock_file(struct file *, struct file_lock *); | 760 | extern int posix_lock_file(struct file *, struct file_lock *); |
761 | extern int posix_lock_file_wait(struct file *, struct file_lock *); | 761 | extern int posix_lock_file_wait(struct file *, struct file_lock *); |
762 | extern void posix_block_lock(struct file_lock *, struct file_lock *); | 762 | extern void posix_block_lock(struct file_lock *, struct file_lock *); |
763 | extern void posix_unblock_lock(struct file *, struct file_lock *); | 763 | extern int posix_unblock_lock(struct file *, struct file_lock *); |
764 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); | 764 | extern int posix_locks_deadlock(struct file_lock *, struct file_lock *); |
765 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); | 765 | extern int flock_lock_file_wait(struct file *filp, struct file_lock *fl); |
766 | extern int __break_lease(struct inode *inode, unsigned int flags); | 766 | extern int __break_lease(struct inode *inode, unsigned int flags); |