]> git.baikalelectronics.ru Git - kernel.git/commit
NLM: Further cancel fixes
authorJ. Bruce Fields <bfields@fieldses.org>
Tue, 3 Jan 2006 08:55:46 +0000 (09:55 +0100)
committerTrond Myklebust <Trond.Myklebust@netapp.com>
Fri, 6 Jan 2006 19:58:54 +0000 (14:58 -0500)
commit1a5834e1a5baf201d2d861346e6fe0522cf1dbb3
tree7b39e558cccce484635dc847a016bbcb5e83abdb
parentafed95bd3baca6b28a4714cebf69e2ae55777b77
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>
fs/lockd/svclock.c
fs/locks.c
include/linux/fs.h