From: Eric Paris Date: Mon, 26 Mar 2012 17:07:59 +0000 (-0400) Subject: inotify: automatically restart syscalls X-Git-Tag: v5.15~20970^2 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06;p=platform%2Fkernel%2Flinux-starfive.git inotify: automatically restart syscalls We were mistakenly returning EINTR when we found an outstanding signal. Instead we should returen ERESTARTSYS and allow the kernel to handle things the right way. Patch-from: Oleg Nesterov Signed-off-by: Eric Paris --- diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c index a6879d1..463e828 100644 --- a/fs/notify/inotify/inotify_user.c +++ b/fs/notify/inotify/inotify_user.c @@ -264,7 +264,7 @@ static ssize_t inotify_read(struct file *file, char __user *buf, ret = -EAGAIN; if (file->f_flags & O_NONBLOCK) break; - ret = -EINTR; + ret = -ERESTARTSYS; if (signal_pending(current)) break;