-
Oleg Nesterov authored
Change wait_event_hrtimeout() to not call __wait_event_hrtimeout() if timeout == 0, this matches other _timeout() helpers in wait.h. This allows to simplify its only user, read_events(), it no longer needs to optimize the "until == 0" case by hand. Note: this patch doesn't use ___wait_cond_timeout because _hrtimeout() also differs in that it returns 0 if succeeds and -ETIME on timeout. Perhaps we should change this to make it fully compatible with other helpers. Link: http://lkml.kernel.org/r/20190607175413.GA29187@redhat.com Signed-off-by: Oleg Nesterov <oleg@redhat.com> Reviewed-by: Andrew Morton <akpm@linux-foundation.org> Cc: Benjamin LaHaise <bcrl@kvack.org> Cc: Arnd Bergmann <arnd@arndb.de> Cc: David Laight <David.Laight@ACULAB.COM> Cc: Deepa Dinamani <deepa.kernel@gmail.com> Cc: "Eric W. Biederman" <ebiederm@xmission.com> Cc: Eric Wong <e@80x24.org> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Stephen Rothwell <sfr@canb.auug.org.au>
b888035e