From f5cb1ba1e8bbd710b869128f17d44d4af4095b79 Mon Sep 17 00:00:00 2001 From: Trond Myklebust Date: Wed, 2 Apr 2008 14:40:53 -0400 Subject: [PATCH] --- yaml --- r: 92920 b: refs/heads/master c: 6b4b3a752b3464f2fd9fe2837fb19270c23c1d6b h: refs/heads/master v: v3 --- [refs] | 2 +- trunk/fs/lockd/clntproc.c | 11 ++++++++++- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/[refs] b/[refs] index e7bcd63695c9..8936f5b06a71 100644 --- a/[refs] +++ b/[refs] @@ -1,2 +1,2 @@ --- -refs/heads/master: 8ec7ff74448f65ac963e330795d771ab14ec8408 +refs/heads/master: 6b4b3a752b3464f2fd9fe2837fb19270c23c1d6b diff --git a/trunk/fs/lockd/clntproc.c b/trunk/fs/lockd/clntproc.c index 5f13e0363b28..ea1a6940af22 100644 --- a/trunk/fs/lockd/clntproc.c +++ b/trunk/fs/lockd/clntproc.c @@ -699,6 +699,10 @@ static const struct rpc_call_ops nlmclnt_unlock_ops = { static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl) { struct nlm_rqst *req; + int status; + + dprintk("lockd: blocking lock attempt was interrupted by a signal.\n" + " Attempting to cancel lock.\n"); req = nlm_alloc_call(nlm_get_host(host)); if (!req) @@ -708,7 +712,12 @@ static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl nlmclnt_setlockargs(req, fl); req->a_args.block = block; - return nlmclnt_async_call(req, NLMPROC_CANCEL, &nlmclnt_cancel_ops); + atomic_inc(&req->a_count); + status = nlmclnt_async_call(req, NLMPROC_CANCEL, &nlmclnt_cancel_ops); + if (status == 0 && req->a_res.status == nlm_lck_denied) + status = -ENOLCK; + nlm_release_call(req); + return status; } static void nlmclnt_cancel_callback(struct rpc_task *task, void *data)