summaryrefslogtreecommitdiffstats
path: root/drivers/net/tun.c
diff options
context:
space:
mode:
authorDavid S. Miller <davem@davemloft.net>2019-03-02 12:54:35 -0800
committerDavid S. Miller <davem@davemloft.net>2019-03-02 12:54:35 -0800
commit9eb359140cd307f8a14f61c19b155ffca5291057 (patch)
tree22d5143608ef1744ca4b7025414777defe8bcca5 /drivers/net/tun.c
parentcf29576fee6016fa7004262cb98f57a2269178f1 (diff)
parent07f12b26e21ab359261bf75cfcb424fdc7daeb6d (diff)
downloadlinux-9eb359140cd307f8a14f61c19b155ffca5291057.tar.gz
linux-9eb359140cd307f8a14f61c19b155ffca5291057.tar.bz2
linux-9eb359140cd307f8a14f61c19b155ffca5291057.zip
Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
Diffstat (limited to 'drivers/net/tun.c')
-rw-r--r--drivers/net/tun.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index 80bff1b4ec17..1d68921723dc 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -2167,9 +2167,9 @@ static void *tun_ring_recv(struct tun_file *tfile, int noblock, int *err)
}
add_wait_queue(&tfile->wq.wait, &wait);
- current->state = TASK_INTERRUPTIBLE;
while (1) {
+ set_current_state(TASK_INTERRUPTIBLE);
ptr = ptr_ring_consume(&tfile->tx_ring);
if (ptr)
break;
@@ -2185,7 +2185,7 @@ static void *tun_ring_recv(struct tun_file *tfile, int noblock, int *err)
schedule();
}
- current->state = TASK_RUNNING;
+ __set_current_state(TASK_RUNNING);
remove_wait_queue(&tfile->wq.wait, &wait);
out: