Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 46069
b: refs/heads/master
c: 2efef83
h: refs/heads/master
i:
  46067: 417e8c7
v: v3
  • Loading branch information
Trond Myklebust authored and Trond Myklebust committed Feb 3, 2007
1 parent 1368cc2 commit 3d1e347
Show file tree
Hide file tree
Showing 4 changed files with 12 additions and 18 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: 54cc533aaa0dc331ad126f0aacfb19572adee638
refs/heads/master: 2efef837fb84f78cee7439804cb3722bffc64e75
2 changes: 1 addition & 1 deletion trunk/include/linux/sunrpc/sched.h
Original file line number Diff line number Diff line change
Expand Up @@ -253,7 +253,7 @@ void rpc_put_task(struct rpc_task *);
void rpc_exit_task(struct rpc_task *);
void rpc_release_calldata(const struct rpc_call_ops *, void *);
void rpc_killall_tasks(struct rpc_clnt *);
int rpc_execute(struct rpc_task *);
void rpc_execute(struct rpc_task *);
void rpc_init_priority_wait_queue(struct rpc_wait_queue *, const char *);
void rpc_init_wait_queue(struct rpc_wait_queue *, const char *);
void rpc_sleep_on(struct rpc_wait_queue *, struct rpc_task *,
Expand Down
14 changes: 5 additions & 9 deletions trunk/net/sunrpc/clnt.c
Original file line number Diff line number Diff line change
Expand Up @@ -486,17 +486,13 @@ int rpc_call_sync(struct rpc_clnt *clnt, struct rpc_message *msg, int flags)
/* Mask signals on RPC calls _and_ GSS_AUTH upcalls */
rpc_task_sigmask(task, &oldset);

rpc_call_setup(task, msg, 0);

/* Set up the call info struct and execute the task */
rpc_call_setup(task, msg, 0);
if (task->tk_status == 0) {
atomic_inc(&task->tk_count);
rpc_execute(task);
}
status = task->tk_status;
if (status != 0)
goto out;
atomic_inc(&task->tk_count);
status = rpc_execute(task);
if (status == 0)
status = task->tk_status;
out:
rpc_put_task(task);
rpc_restore_sigmask(&oldset);
return status;
Expand Down
12 changes: 5 additions & 7 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -625,7 +625,7 @@ void rpc_release_calldata(const struct rpc_call_ops *ops, void *calldata)
/*
* This is the RPC `scheduler' (or rather, the finite state machine).
*/
static int __rpc_execute(struct rpc_task *task)
static void __rpc_execute(struct rpc_task *task)
{
int status = 0;

Expand Down Expand Up @@ -679,9 +679,9 @@ static int __rpc_execute(struct rpc_task *task)
if (RPC_IS_ASYNC(task)) {
/* Careful! we may have raced... */
if (RPC_IS_QUEUED(task))
return 0;
return;
if (rpc_test_and_set_running(task))
return 0;
return;
continue;
}

Expand Down Expand Up @@ -710,7 +710,6 @@ static int __rpc_execute(struct rpc_task *task)
dprintk("RPC: %4d, return %d, status %d\n", task->tk_pid, status, task->tk_status);
/* Release all resources associated with the task */
rpc_release_task(task);
return status;
}

/*
Expand All @@ -722,12 +721,11 @@ static int __rpc_execute(struct rpc_task *task)
* released. In particular note that tk_release() will have
* been called, so your task memory may have been freed.
*/
int
rpc_execute(struct rpc_task *task)
void rpc_execute(struct rpc_task *task)
{
rpc_set_active(task);
rpc_set_running(task);
return __rpc_execute(task);
__rpc_execute(task);
}

static void rpc_async_schedule(struct work_struct *work)
Expand Down

0 comments on commit 3d1e347

Please sign in to comment.