make fanotify_read() restartable across signals
authorLino Sanfilippo <LinoSanfilippo@gmx.de>
Fri, 29 Oct 2010 10:06:42 +0000 (12:06 +0200)
committerEric Paris <eparis@redhat.com>
Sat, 30 Oct 2010 18:07:35 +0000 (14:07 -0400)
    In fanotify_read() return -ERESTARTSYS instead of -EINTR to
    make read() restartable across signals (BSD semantic).

Signed-off-by: Eric Paris <eparis@redhat.com>
fs/notify/fanotify/fanotify_user.c

index fce66df..0632248 100644 (file)
@@ -330,7 +330,7 @@ static ssize_t fanotify_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;