aboutsummaryrefslogtreecommitdiffstats
path: root/fs/lockd/svc4proc.c
diff options
context:
space:
mode:
authorMarc Eshel <eshel@almaden.ibm.com>2006-11-28 16:27:06 -0500
committerJ. Bruce Fields <bfields@citi.umich.edu>2007-05-06 20:38:50 -0400
commit1a8322b2b02071b0c7ac37a28357b93e6362f13e (patch)
tree04fbdd52d8b3c2886d70b3739b9dff683aa79f02 /fs/lockd/svc4proc.c
parentf812048020282fdfa9b72a6cf539c33b6df1fd07 (diff)
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>
Diffstat (limited to 'fs/lockd/svc4proc.c')
-rw-r--r--fs/lockd/svc4proc.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/lockd/svc4proc.c b/fs/lockd/svc4proc.c
index 205d8befbf1b..bf27b6c6cb6b 100644
--- a/fs/lockd/svc4proc.c
+++ b/fs/lockd/svc4proc.c
@@ -145,6 +145,8 @@ nlm4svc_proc_lock(struct svc_rqst *rqstp, struct nlm_args *argp,
145 /* Now try to lock the file */ 145 /* Now try to lock the file */
146 resp->status = nlmsvc_lock(rqstp, file, &argp->lock, 146 resp->status = nlmsvc_lock(rqstp, file, &argp->lock,
147 argp->block, &argp->cookie); 147 argp->block, &argp->cookie);
148 if (resp->status == nlm_drop_reply)
149 return rpc_drop_reply;
148 150
149 dprintk("lockd: LOCK status %d\n", ntohl(resp->status)); 151 dprintk("lockd: LOCK status %d\n", ntohl(resp->status));
150 nlm_release_host(host); 152 nlm_release_host(host);