* [PATCH] freezer: fix return value of freezable_schedule_timeout_killable
@ 2011-12-24 2:00 Jeff Layton
2011-12-27 21:53 ` Rafael J. Wysocki
0 siblings, 1 reply; 2+ messages in thread
From: Jeff Layton @ 2011-12-24 2:00 UTC (permalink / raw)
To: rjw; +Cc: linux-pm, linux-kernel
...it should return the return code from schedule_timeout_killable(),
not the one from freezer_count().
All of the current callers ignore the return code so the bug is
harmless but it's worth fixing.
Signed-off-by: Jeff Layton <jlayton@redhat.com>
---
include/linux/freezer.h | 4 +++-
1 files changed, 3 insertions(+), 1 deletions(-)
diff --git a/include/linux/freezer.h b/include/linux/freezer.h
index 30f06c2..96b5b59 100644
--- a/include/linux/freezer.h
+++ b/include/linux/freezer.h
@@ -122,9 +122,11 @@ static inline int freezer_should_skip(struct task_struct *p)
/* Like schedule_timeout_killable(), but should not block the freezer. */
#define freezable_schedule_timeout_killable(timeout) \
({ \
+ long __retval; \
freezer_do_not_count(); \
- schedule_timeout_killable(timeout); \
+ __retval = schedule_timeout_killable(timeout); \
freezer_count(); \
+ __retval; \
})
/*
--
1.7.7.4
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [PATCH] freezer: fix return value of freezable_schedule_timeout_killable
2011-12-24 2:00 [PATCH] freezer: fix return value of freezable_schedule_timeout_killable Jeff Layton
@ 2011-12-27 21:53 ` Rafael J. Wysocki
0 siblings, 0 replies; 2+ messages in thread
From: Rafael J. Wysocki @ 2011-12-27 21:53 UTC (permalink / raw)
To: Jeff Layton; +Cc: linux-pm, linux-kernel
On Saturday, December 24, 2011, Jeff Layton wrote:
> ...it should return the return code from schedule_timeout_killable(),
> not the one from freezer_count().
>
> All of the current callers ignore the return code so the bug is
> harmless but it's worth fixing.
>
> Signed-off-by: Jeff Layton <jlayton@redhat.com>
Applied to linux-pm/pm-freezer, will be pushed for 3.3.
Thanks,
Rafael
> ---
> include/linux/freezer.h | 4 +++-
> 1 files changed, 3 insertions(+), 1 deletions(-)
>
> diff --git a/include/linux/freezer.h b/include/linux/freezer.h
> index 30f06c2..96b5b59 100644
> --- a/include/linux/freezer.h
> +++ b/include/linux/freezer.h
> @@ -122,9 +122,11 @@ static inline int freezer_should_skip(struct task_struct *p)
> /* Like schedule_timeout_killable(), but should not block the freezer. */
> #define freezable_schedule_timeout_killable(timeout) \
> ({ \
> + long __retval; \
> freezer_do_not_count(); \
> - schedule_timeout_killable(timeout); \
> + __retval = schedule_timeout_killable(timeout); \
> freezer_count(); \
> + __retval; \
> })
>
> /*
>
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-12-27 21:50 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-12-24 2:00 [PATCH] freezer: fix return value of freezable_schedule_timeout_killable Jeff Layton
2011-12-27 21:53 ` Rafael J. Wysocki
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®