Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 316821
b: refs/heads/master
c: 95fdd5e
h: refs/heads/master
i:
  316819: d50343d
v: v3
  • Loading branch information
Neil Horman authored and James Bottomley committed Jul 20, 2012
1 parent 7f6250a commit 7a2b1a2
Show file tree
Hide file tree
Showing 2 changed files with 11 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: 902a45af5c9fad283a530c3bc71225fa6a8e616a
refs/heads/master: 95fdd5e980e6eea4579c15043f7a9be6ad63012c
18 changes: 10 additions & 8 deletions trunk/drivers/scsi/fcoe/fcoe.c
Original file line number Diff line number Diff line change
Expand Up @@ -1851,23 +1851,25 @@ static int fcoe_percpu_receive_thread(void *arg)

set_user_nice(current, -20);

retry:
while (!kthread_should_stop()) {

spin_lock_bh(&p->fcoe_rx_list.lock);
skb_queue_splice_init(&p->fcoe_rx_list, &tmp);
spin_unlock_bh(&p->fcoe_rx_list.lock);

while ((skb = __skb_dequeue(&tmp)) != NULL)
fcoe_recv_frame(skb);

spin_lock_bh(&p->fcoe_rx_list.lock);
if (!skb_queue_len(&p->fcoe_rx_list)) {
if (!skb_queue_len(&tmp)) {
set_current_state(TASK_INTERRUPTIBLE);
spin_unlock_bh(&p->fcoe_rx_list.lock);
schedule();
set_current_state(TASK_RUNNING);
} else
spin_unlock_bh(&p->fcoe_rx_list.lock);
goto retry;
}

spin_unlock_bh(&p->fcoe_rx_list.lock);

while ((skb = __skb_dequeue(&tmp)) != NULL)
fcoe_recv_frame(skb);

}
return 0;
}
Expand Down

0 comments on commit 7a2b1a2

Please sign in to comment.