From: Eric Paris <eparis@redhat.com>
To: Lino Sanfilippo <LinoSanfilippo@gmx.de>
Cc: linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Subject: Re: [PATCH] make fanotify_read() restartable across signals
Date: Fri, 29 Oct 2010 09:53:48 -0400 [thread overview]
Message-ID: <1288360428.3017.16.camel@localhost.localdomain> (raw)
In-Reply-To: <20101029100642.GD26242@lsanfilippo.unix.rd.tt.avira.com>
On Fri, 2010-10-29 at 12:06 +0200, Lino Sanfilippo wrote:
> In fanotify_read() return -ERESTARTSYS instead of -EINTR to
> make read() restartable across signals (BSD semantic).
Looks good, I'll add it today.
Thanks!
-Eric
> ---
> 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;
>
prev parent reply other threads:[~2010-10-29 13:53 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-10-29 10:06 [PATCH] make fanotify_read() restartable across signals Lino Sanfilippo
2010-10-29 13:53 ` Eric Paris [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1288360428.3017.16.camel@localhost.localdomain \
--to=eparis@redhat.com \
--cc=LinoSanfilippo@gmx.de \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).