Browse Source

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>
Eric Paris 13 years ago
parent
commit
1ca39ab9d2
1 changed files with 1 additions and 1 deletions
  1. 1 1
      fs/notify/inotify/inotify_user.c

+ 1 - 1
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;