lkml.org 
[lkml]   [2011]   [Dec]   [23]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
Patch in this message
/
From
Subject[PATCH] freezer: fix return value of freezable_schedule_timeout_killable
Date
...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


\
 
 \ /
  Last update: 2011-12-24 03:03    [W:0.259 / U:0.100 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site