summaryrefslogtreecommitdiffstats
path: root/fs/notify
diff options
context:
space:
mode:
authorEric Paris <eparis@redhat.com>2012-03-26 19:07:59 +0200
committerEric Paris <eparis@redhat.com>2012-12-11 19:44:37 +0100
commit1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06 (patch)
treeb29442cfe30bf48bc2de777ac438604fa3a5ddaa /fs/notify
parentinotify: dont skip removal of watch descriptor if creation of ignored event f... (diff)
downloadlinux-1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06.tar.xz
linux-1ca39ab9d21ac93f94b9e3eb364ea9a5cf2aba06.zip
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 <oleg@redhat.com> Signed-off-by: Eric Paris <eparis@redhat.com>
Diffstat (limited to 'fs/notify')
-rw-r--r--fs/notify/inotify/inotify_user.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/notify/inotify/inotify_user.c b/fs/notify/inotify/inotify_user.c
index a6879d169241..463e828f1f31 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;