Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 255475
b: refs/heads/master
c: 61a5ff1
h: refs/heads/master
i:
  255473: 8d83564
  255471: e57fd8b
v: v3
  • Loading branch information
Amos Kong authored and David S. Miller committed Jun 9, 2011
1 parent 6a53922 commit cc686b2
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 3 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: 6f7c156c08d5eaa9fff2bd062f0a2b9d09a1e7a9
refs/heads/master: 61a5ff15ebdab87887861a6b128b108404e4706d
6 changes: 4 additions & 2 deletions trunk/drivers/net/tun.c
Original file line number Diff line number Diff line change
Expand Up @@ -817,7 +817,8 @@ static ssize_t tun_do_read(struct tun_struct *tun,

tun_debug(KERN_INFO, tun, "tun_chr_read\n");

add_wait_queue(&tun->wq.wait, &wait);
if (unlikely(!noblock))
add_wait_queue(&tun->wq.wait, &wait);
while (len) {
current->state = TASK_INTERRUPTIBLE;

Expand Down Expand Up @@ -848,7 +849,8 @@ static ssize_t tun_do_read(struct tun_struct *tun,
}

current->state = TASK_RUNNING;
remove_wait_queue(&tun->wq.wait, &wait);
if (unlikely(!noblock))
remove_wait_queue(&tun->wq.wait, &wait);

return ret;
}
Expand Down

0 comments on commit cc686b2

Please sign in to comment.