Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 21032
b: refs/heads/master
c: e6d83d5
h: refs/heads/master
v: v3
  • Loading branch information
Trond Myklebust authored and Linus Torvalds committed Mar 14, 2006
1 parent 9a792e4 commit 96e7ad2
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 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: c12e87f4652b1ba3be168b4f63a440399b941928
refs/heads/master: e6d83d55698b73b4d5d55d3d7715a4c26030d577
13 changes: 5 additions & 8 deletions trunk/net/sunrpc/sched.c
Original file line number Diff line number Diff line change
Expand Up @@ -515,16 +515,14 @@ struct rpc_task * rpc_wake_up_next(struct rpc_wait_queue *queue)
*/
void rpc_wake_up(struct rpc_wait_queue *queue)
{
struct rpc_task *task;

struct rpc_task *task, *next;
struct list_head *head;

spin_lock_bh(&queue->lock);
head = &queue->tasks[queue->maxpriority];
for (;;) {
while (!list_empty(head)) {
task = list_entry(head->next, struct rpc_task, u.tk_wait.list);
list_for_each_entry_safe(task, next, head, u.tk_wait.list)
__rpc_wake_up_task(task);
}
if (head == &queue->tasks[0])
break;
head--;
Expand All @@ -541,14 +539,13 @@ void rpc_wake_up(struct rpc_wait_queue *queue)
*/
void rpc_wake_up_status(struct rpc_wait_queue *queue, int status)
{
struct rpc_task *task, *next;
struct list_head *head;
struct rpc_task *task;

spin_lock_bh(&queue->lock);
head = &queue->tasks[queue->maxpriority];
for (;;) {
while (!list_empty(head)) {
task = list_entry(head->next, struct rpc_task, u.tk_wait.list);
list_for_each_entry_safe(task, next, head, u.tk_wait.list) {
task->tk_status = status;
__rpc_wake_up_task(task);
}
Expand Down

0 comments on commit 96e7ad2

Please sign in to comment.