[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <1288360428.3017.16.camel@localhost.localdomain>
Date: Fri, 29 Oct 2010 09:53:48 -0400
From: Eric Paris <eparis@...hat.com>
To: Lino Sanfilippo <LinoSanfilippo@....de>
Cc: linux-kernel@...r.kernel.org, linux-fsdevel@...r.kernel.org
Subject: Re: [PATCH] make fanotify_read() restartable across signals
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;
>
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists