powerpc: Honor O_NONBLOCK flag when reading RTAS log
rtas_log_read() doesn't check file flags for O_NONBLOCK and blocks non-blocking readers of /proc/ppc64/rtas/error_log when there is no data available. This fixes it. Also rtas_log_read() returns now with ENODATA to prevent suspending of process in wait_event_interruptible() when logging facility was switched off and log is already empty. Signed-off-by: NVitaly Mayatskikh <v.mayatskih@gmail.com> Acked-by: NDavid Howells <dhowells@redhat.com> Signed-off-by: NBenjamin Herrenschmidt <benh@kernel.crashing.org>
Showing
想要评论请 注册 或 登录