[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <yo37kh4b27m2v5uddoorxmuhxif5n56hrc5h7ndl5btghiovdj@lsriah45m5ua>
Date: Tue, 27 May 2025 14:28:39 +0900
From: Sergey Senozhatsky <senozhatsky@...omium.org>
To: Jan Kara <jack@...e.cz>
Cc: Sergey Senozhatsky <senozhatsky@...omium.org>,
Amir Goldstein <amir73il@...il.com>, Matthew Bobrowski <repnop@...gle.com>,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [RFC PATCH] fanotify: wake-up all waiters on release
On (25/05/26 18:47), Jan Kara wrote:
> > Another silly question: what decrements group->user_waits in case of
> > that race-condition?
> >
> > ---
> >
> > diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
> > index 9dac7f6e72d2b..38b977fe37a71 100644
> > --- a/fs/notify/fanotify/fanotify.c
> > +++ b/fs/notify/fanotify/fanotify.c
> > @@ -945,8 +945,10 @@ static int fanotify_handle_event(struct fsnotify_group *group, u32 mask,
> > if (FAN_GROUP_FLAG(group, FANOTIFY_FID_BITS)) {
> > fsid = fanotify_get_fsid(iter_info);
> > /* Racing with mark destruction or creation? */
> > - if (!fsid.val[0] && !fsid.val[1])
> > - return 0;
> > + if (!fsid.val[0] && !fsid.val[1]) {
> > + ret = 0;
> > + goto finish;
> > + }
> > }
>
> This code is not present in current upstream kernel. This seems to have
> been inadvertedly fixed by commit 30ad1938326b ("fanotify: allow "weak" fsid
> when watching a single filesystem") which you likely don't have in your
> kernel.
Oh, sweet. Thanks for the pointers, Jan.
Powered by blists - more mailing lists