Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 92920
b: refs/heads/master
c: 6b4b3a7
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Apr 19, 2008
1 parent a6c72b0 commit f5cb1ba
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 8ec7ff74448f65ac963e330795d771ab14ec8408
refs/heads/master: 6b4b3a752b3464f2fd9fe2837fb19270c23c1d6b
11 changes: 10 additions & 1 deletion trunk/fs/lockd/clntproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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)
Expand All @@ -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)
Expand Down

0 comments on commit f5cb1ba

Please sign in to comment.