Skip to content

Commit

Permalink
inotify: automatically restart syscalls
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
eparis committed Dec 11, 2012
1 parent 8b99c3c commit 1ca39ab
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/notify/inotify/inotify_user.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down

0 comments on commit 1ca39ab

Please sign in to comment.