Skip to content

Commit

Permalink
PM / Freezer: fix return value of freezable_schedule_timeout_killable()
Browse files Browse the repository at this point in the history
...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>
Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl>
  • Loading branch information
Jeff Layton authored and Rafael J. Wysocki committed Dec 27, 2011
1 parent 467de1f commit b3b73ec
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/linux/freezer.h
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,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; \
})

/*
Expand Down

0 comments on commit b3b73ec

Please sign in to comment.