From mboxrd@z Thu Jan 1 00:00:00 1970 From: Lino Sanfilippo Subject: [PATCH] make fanotify_read() restartable across signals Date: Fri, 29 Oct 2010 12:06:42 +0200 Message-ID: <20101029100642.GD26242@lsanfilippo.unix.rd.tt.avira.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org To: eparis@redhat.com Return-path: Received: from mailout-de.gmx.net ([213.165.64.23]:36013 "HELO mail.gmx.net" rhost-flags-OK-OK-OK-FAIL) by vger.kernel.org with SMTP id S1752328Ab0J2KIB (ORCPT ); Fri, 29 Oct 2010 06:08:01 -0400 Content-Disposition: inline Sender: linux-fsdevel-owner@vger.kernel.org List-ID: In fanotify_read() return -ERESTARTSYS instead of -EINTR to make read() restartable across signals (BSD semantic). --- This patch applies against commit 3970d817558a426cc2f53eaa01182eb9452e0cb1 of branch 'origin/for-next' from git.infradead.org/users/eparis/notify.git diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c index 8c9fd35..99a8e60 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;