]> git.baikalelectronics.ru Git - kernel.git/commit
lockd: add code to handle deferred lock requests
authorMarc Eshel <eshel@almaden.ibm.com>
Tue, 28 Nov 2006 21:27:06 +0000 (16:27 -0500)
committerJ. Bruce Fields <bfields@citi.umich.edu>
Mon, 7 May 2007 00:38:50 +0000 (20:38 -0400)
commit47ed85dedd5d35102f12f11052d70dd8df15cf88
tree04fbdd52d8b3c2886d70b3739b9dff683aa79f02
parente2864e46f47a87c4990ccdcc30e11cc9888896b4
lockd: add code to handle deferred lock requests

Rewrite nlmsvc_lock() to use the asynchronous interface.

As with testlock, we answer nlm requests in nlmsvc_lock by first looking up
the block and then using the results we find in the block if B_QUEUED is
set, and calling vfs_lock_file() otherwise.

If this a new lock request and we get -EINPROGRESS return on a non-blocking
request then we defer the request.

Also modify nlmsvc_unlock() to call the filesystem method if appropriate.

Signed-off-by: Marc Eshel <eshel@almaden.ibm.com>
Signed-off-by: J. Bruce Fields <bfields@citi.umich.edu>
fs/lockd/svc4proc.c
fs/lockd/svclock.c
fs/lockd/svcproc.c
fs/lockd/svcsubs.c