diff options
author | Andrew Morton <akpm@linux-foundation.org> | 2007-04-12 17:45:32 -0400 |
---|---|---|
committer | David S. Miller <davem@davemloft.net> | 2007-04-12 17:45:32 -0400 |
commit | 09fe3ef46c5a2cc65d173df9518013e208eb3ba3 (patch) | |
tree | ec2ef46a95c1d1c6d85f72c65b429207135951b6 /net | |
parent | 01102e7ca2e71ec0c300d41a1f3e594235b733ee (diff) |
[PKTGEN]: Add try_to_freeze()
The pktgen module prevents suspend-to-disk. Fix.
Acked-by: "Michal Piotrowski" <michal.k.k.piotrowski@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
Diffstat (limited to 'net')
-rw-r--r-- | net/core/pktgen.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/net/core/pktgen.c b/net/core/pktgen.c index 74a9a32b906d..4b01496dc33d 100644 --- a/net/core/pktgen.c +++ b/net/core/pktgen.c | |||
@@ -129,6 +129,7 @@ | |||
129 | #include <linux/ioport.h> | 129 | #include <linux/ioport.h> |
130 | #include <linux/interrupt.h> | 130 | #include <linux/interrupt.h> |
131 | #include <linux/capability.h> | 131 | #include <linux/capability.h> |
132 | #include <linux/freezer.h> | ||
132 | #include <linux/delay.h> | 133 | #include <linux/delay.h> |
133 | #include <linux/timer.h> | 134 | #include <linux/timer.h> |
134 | #include <linux/list.h> | 135 | #include <linux/list.h> |
@@ -3333,6 +3334,8 @@ static int pktgen_thread_worker(void *arg) | |||
3333 | t->control &= ~(T_REMDEV); | 3334 | t->control &= ~(T_REMDEV); |
3334 | } | 3335 | } |
3335 | 3336 | ||
3337 | try_to_freeze(); | ||
3338 | |||
3336 | set_current_state(TASK_INTERRUPTIBLE); | 3339 | set_current_state(TASK_INTERRUPTIBLE); |
3337 | } | 3340 | } |
3338 | 3341 | ||