提交 09fe3ef4 编写于 作者: A Andrew Morton 提交者: David S. Miller

[PKTGEN]: Add try_to_freeze()

The pktgen module prevents suspend-to-disk.  Fix.
Acked-by: N"Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
Signed-off-by: NAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: NDavid S. Miller <davem@davemloft.net>
上级 01102e7c
...@@ -129,6 +129,7 @@ ...@@ -129,6 +129,7 @@
#include <linux/ioport.h> #include <linux/ioport.h>
#include <linux/interrupt.h> #include <linux/interrupt.h>
#include <linux/capability.h> #include <linux/capability.h>
#include <linux/freezer.h>
#include <linux/delay.h> #include <linux/delay.h>
#include <linux/timer.h> #include <linux/timer.h>
#include <linux/list.h> #include <linux/list.h>
...@@ -3333,6 +3334,8 @@ static int pktgen_thread_worker(void *arg) ...@@ -3333,6 +3334,8 @@ static int pktgen_thread_worker(void *arg)
t->control &= ~(T_REMDEV); t->control &= ~(T_REMDEV);
} }
try_to_freeze();
set_current_state(TASK_INTERRUPTIBLE); set_current_state(TASK_INTERRUPTIBLE);
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册