public inbox for stable@vger.kernel.org
 help / color / mirror / Atom feed
From: Greg KH <gregkh@linuxfoundation.org>
To: Amir Goldstein <amir73il@gmail.com>
Cc: Jan Kara <jack@suse.cz>, Miklos Szeredi <miklos@szeredi.hu>,
	Matthew Bobrowski <mbobrowski@mbobrowski.org>,
	linux-fsdevel <linux-fsdevel@vger.kernel.org>,
	stable <stable@vger.kernel.org>
Subject: Re: [PATCH (backport)] fanotify: fix handling of events on child sub-directory
Date: Wed, 28 Nov 2018 14:19:14 +0100	[thread overview]
Message-ID: <20181128131914.GB21472@kroah.com> (raw)
In-Reply-To: <CAOQ4uxip870WRq=3m3_NjiNeEa1xduCnFgE++qitzZFRizk7kw@mail.gmail.com>

On Wed, Nov 28, 2018 at 01:58:15PM +0200, Amir Goldstein wrote:
> On Wed, Nov 28, 2018 at 1:03 PM Greg KH <gregkh@linuxfoundation.org> wrote:
> >
> > On Wed, Nov 28, 2018 at 12:02:07PM +0100, Greg KH wrote:
> > > On Tue, Nov 27, 2018 at 05:23:54PM +0100, Jan Kara wrote:
> > > > On Tue 27-11-18 16:25:41, Amir Goldstein wrote:
> > > > > On Tue, Nov 27, 2018 at 1:42 PM Miklos Szeredi <miklos@szeredi.hu> wrote:
> > > > > >
> > > > > > On Tue, Nov 27, 2018 at 12:24 PM Amir Goldstein <amir73il@gmail.com> wrote:
> > > > > > >
> > > > > > > On Tue, Nov 27, 2018 at 11:09 AM Miklos Szeredi <miklos@szeredi.hu> wrote:
> > > > > > > >
> > > > > > > > Hi Amir,
> > > > > > > >
> > > > > > > > Here's a backport of this patch to 4.18 and earlier.  Tested good with
> > > > > > > > ltp/fanotify09.
> > > > > > >
> > > > > > > AFAICS this backport is identical to my v4.19 backport and yes, it looks fine.
> > > > > > > I just missed the fact that my v4.19 does apply cleanly on v4.18 or I would
> > > > > > > have asked Greg to apply it.
> > > > > >
> > > > > > Where's your v4.19 backport?  I don't see it only any list.
> > > > >
> > > > > Hmm, I replied to this message with a patch, but my reply is not in the archive:
> > > > > https://www.spinics.net/lists/stable-commits/msg103743.html
> > > > >
> > > > > So I guess my backport patch is nowhere....
> > > > > I did also CC Greg and Jan, so maybe Greg can say what went wrong?
> > > >
> > > > Yes, and at least I have received your email.
> > >
> > > I have it too, it's in my queue.  So, should I take Amir's patch or this
> > > one?
> >
> > Oh nevermind, they are the same, I've added Amir's patch now...
> 
> Two notes:
> 1. You can apply same patch to v4.18 (Miklos tested it).

4.18 is end-of-life, sorry, not touching that anymore.

> 2. Patches are not the same on the line:
> Miklos:
> -       else if (p_inode->i_fsnotify_mask & mask) {
> +       } else if (p_inode->i_fsnotify_mask & mask & ~FS_EVENT_ON_CHILD) {
> Amir:
> -       else if (p_inode->i_fsnotify_mask & mask) {
> +       } else if (p_inode->i_fsnotify_mask & mask & ALL_FSNOTIFY_EVENTS) {
> 
> Miklos' patch is more accurate than mine.
> OTOH, my patch keeps the code more similar in master and stable.

I would prefer to keep things aligned with what is in Linus's tree where
ever possible.

> The difference is insignificant from user perspective.
> Its a very very minor optimization that my backport did not get right.
> 
> If we want to have the best of both worlds (correctness and similar to master)
> you may apply this commit from upstream before my backport patch:
> 007d1e8395ea fsnotify: generalize handling of extra event flags
> 
> This patch removes FS_EVENT_ON_CHILD from ALL_FSNOTIFY_EVENTS.
> I verified that it applies cleanly on 4.19.y and 4.18.y.
> 
> That would be my preferred option.

Ok, I've now done that, thanks.

greg k-h

  reply	other threads:[~2018-11-28 13:19 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27  9:09 [PATCH (backport)] fanotify: fix handling of events on child sub-directory Miklos Szeredi
2018-11-27 11:24 ` Amir Goldstein
2018-11-27 11:41   ` Miklos Szeredi
2018-11-27 14:25     ` Amir Goldstein
2018-11-27 16:23       ` Jan Kara
2018-11-28 11:02         ` Greg KH
2018-11-28 11:03           ` Greg KH
2018-11-28 11:58             ` Amir Goldstein
2018-11-28 13:19               ` Greg KH [this message]
2018-11-27 16:38       ` Sasha Levin
2018-11-27 16:49         ` Amir Goldstein

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=20181128131914.GB21472@kroah.com \
    --to=gregkh@linuxfoundation.org \
    --cc=amir73il@gmail.com \
    --cc=jack@suse.cz \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=mbobrowski@mbobrowski.org \
    --cc=miklos@szeredi.hu \
    --cc=stable@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