tun: remove unnecessary memory barrier [Linux 5.0]

tun: remove unnecessary memory barrier [Linux 5.0]

This Linux kernel change "tun: remove unnecessary memory barrier" is included in the Linux 5.0 release. This change is authored by Timur Celik <mail [at] timurcelik.de> on Mon Feb 25 21:13:13 2019 +0100. The commit for this change in Linux stable tree is ecef67c (patch).

tun: remove unnecessary memory barrier

Replace set_current_state with __set_current_state since no memory
barrier is needed at this point.

Signed-off-by: Timur Celik <[email protected]>
Reviewed-by: Eric Dumazet <[email protected]>
Signed-off-by: David S. Miller <[email protected]>

There are 2 lines of Linux source code added/deleted in this change. Code changes to Linux kernel are as follows.

 drivers/net/tun.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/net/tun.c b/drivers/net/tun.c
index d291762..53f4f37 100644
--- a/drivers/net/tun.c
+++ b/drivers/net/tun.c
@@ -2185,7 +2185,7 @@ static void *tun_ring_recv(struct tun_file *tfile, int noblock, int *err)

-   set_current_state(TASK_RUNNING);
+   __set_current_state(TASK_RUNNING);
    remove_wait_queue(&tfile->wq.wait, &wait);


Leave a Reply

Your email address will not be published. Required fields are marked *