From: Lino Sanfilippo Date: Fri, 29 Oct 2010 10:06:42 +0000 (+0200) Subject: make fanotify_read() restartable across signals X-Git-Tag: v2.6.37-rc1~17^2~1 X-Git-Url: http://bbs.cooldavid.org/git/?p=net-next-2.6.git;a=commitdiff_plain;h=1a5cea7215f7c6bd3c960d7b44e864f3a73d1ad4 make fanotify_read() restartable across signals In fanotify_read() return -ERESTARTSYS instead of -EINTR to make read() restartable across signals (BSD semantic). Signed-off-by: Eric Paris --- diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index fce66dfbf7d..063224812b7 100644 --- a/fs/notify/fanotify/fanotify_user.c +++ b/fs/notify/fanotify/fanotify_user.c @@ -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;