Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 229192
b: refs/heads/master
c: 7db836d
h: refs/heads/master
v: v3
  • Loading branch information
Chuck Lever authored and Trond Myklebust committed Dec 16, 2010
1 parent 734eec4 commit bbe08de
Show file tree
Hide file tree
Showing 6 changed files with 23 additions and 14 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: 723bb5b5052faba57060a2feb564ced22416b5bc
refs/heads/master: 7db836d4a427c3c64406b00b6d8d745d6335d72a
12 changes: 6 additions & 6 deletions trunk/fs/lockd/clntproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -211,7 +211,7 @@ struct nlm_rqst *nlm_alloc_call(struct nlm_host *host)
return NULL;
}

void nlm_release_call(struct nlm_rqst *call)
void nlmclnt_release_call(struct nlm_rqst *call)
{
if (!atomic_dec_and_test(&call->a_count))
return;
Expand All @@ -222,7 +222,7 @@ void nlm_release_call(struct nlm_rqst *call)

static void nlmclnt_rpc_release(void *data)
{
nlm_release_call(data);
nlmclnt_release_call(data);
}

static int nlm_wait_on_grace(wait_queue_head_t *queue)
Expand Down Expand Up @@ -436,7 +436,7 @@ nlmclnt_test(struct nlm_rqst *req, struct file_lock *fl)
status = nlm_stat_to_errno(req->a_res.status);
}
out:
nlm_release_call(req);
nlmclnt_release_call(req);
return status;
}

Expand Down Expand Up @@ -593,7 +593,7 @@ nlmclnt_lock(struct nlm_rqst *req, struct file_lock *fl)
out_unblock:
nlmclnt_finish_block(block);
out:
nlm_release_call(req);
nlmclnt_release_call(req);
return status;
out_unlock:
/* Fatal error: ensure that we remove the lock altogether */
Expand Down Expand Up @@ -694,7 +694,7 @@ nlmclnt_unlock(struct nlm_rqst *req, struct file_lock *fl)
/* What to do now? I'm out of my depth... */
status = -ENOLCK;
out:
nlm_release_call(req);
nlmclnt_release_call(req);
return status;
}

Expand Down Expand Up @@ -755,7 +755,7 @@ static int nlmclnt_cancel(struct nlm_host *host, int block, struct file_lock *fl
NLMPROC_CANCEL, &nlmclnt_cancel_ops);
if (status == 0 && req->a_res.status == nlm_lck_denied)
status = -ENOLCK;
nlm_release_call(req);
nlmclnt_release_call(req);
return status;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/lockd/svc4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,7 +229,7 @@ static void nlm4svc_callback_exit(struct rpc_task *task, void *data)

static void nlm4svc_callback_release(void *data)
{
nlm_release_call(data);
nlmsvc_release_call(data);
}

static const struct rpc_call_ops nlm4svc_callback_ops = {
Expand Down Expand Up @@ -261,7 +261,7 @@ static __be32 nlm4svc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args

stat = func(rqstp, argp, &call->a_res);
if (stat != 0) {
nlm_release_call(call);
nlmsvc_release_call(call);
return stat;
}

Expand Down
4 changes: 2 additions & 2 deletions trunk/fs/lockd/svclock.c
Original file line number Diff line number Diff line change
Expand Up @@ -234,7 +234,7 @@ nlmsvc_create_block(struct svc_rqst *rqstp, struct nlm_host *host,
failed_free:
kfree(block);
failed:
nlm_release_call(call);
nlmsvc_release_call(call);
return NULL;
}

Expand Down Expand Up @@ -267,7 +267,7 @@ static void nlmsvc_free_block(struct kref *kref)
mutex_unlock(&file->f_mutex);

nlmsvc_freegrantargs(block->b_call);
nlm_release_call(block->b_call);
nlmsvc_release_call(block->b_call);
nlm_release_file(block->b_file);
kfree(block->b_fl);
kfree(block);
Expand Down
12 changes: 10 additions & 2 deletions trunk/fs/lockd/svcproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,9 +257,17 @@ static void nlmsvc_callback_exit(struct rpc_task *task, void *data)
-task->tk_status);
}

void nlmsvc_release_call(struct nlm_rqst *call)
{
if (!atomic_dec_and_test(&call->a_count))
return;
nlm_release_host(call->a_host);
kfree(call);
}

static void nlmsvc_callback_release(void *data)
{
nlm_release_call(data);
nlmsvc_release_call(data);
}

static const struct rpc_call_ops nlmsvc_callback_ops = {
Expand Down Expand Up @@ -291,7 +299,7 @@ static __be32 nlmsvc_callback(struct svc_rqst *rqstp, u32 proc, struct nlm_args

stat = func(rqstp, argp, &call->a_res);
if (stat != 0) {
nlm_release_call(call);
nlmsvc_release_call(call);
return stat;
}

Expand Down
3 changes: 2 additions & 1 deletion trunk/include/linux/lockd/lockd.h
Original file line number Diff line number Diff line change
Expand Up @@ -202,9 +202,9 @@ extern u32 nsm_local_state;
* Lockd client functions
*/
struct nlm_rqst * nlm_alloc_call(struct nlm_host *host);
void nlm_release_call(struct nlm_rqst *);
int nlm_async_call(struct nlm_rqst *, u32, const struct rpc_call_ops *);
int nlm_async_reply(struct nlm_rqst *, u32, const struct rpc_call_ops *);
void nlmclnt_release_call(struct nlm_rqst *);
struct nlm_wait * nlmclnt_prepare_block(struct nlm_host *host, struct file_lock *fl);
void nlmclnt_finish_block(struct nlm_wait *block);
int nlmclnt_block(struct nlm_wait *block, struct nlm_rqst *req, long timeout);
Expand Down Expand Up @@ -267,6 +267,7 @@ unsigned long nlmsvc_retry_blocked(void);
void nlmsvc_traverse_blocks(struct nlm_host *, struct nlm_file *,
nlm_host_match_fn_t match);
void nlmsvc_grant_reply(struct nlm_cookie *, __be32);
void nlmsvc_release_call(struct nlm_rqst *);

/*
* File handling for the server personality
Expand Down

0 comments on commit bbe08de

Please sign in to comment.