[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <bsji6w5ytunjt5vlgj6t53rrksqc7lp5fukwi2sbettzuzvnmg@fna73sxftrak>
Date: Wed, 21 May 2025 12:18:06 +0200
From: Jan Kara <jack@...e.cz>
To: Sergey Senozhatsky <senozhatsky@...omium.org>
Cc: Jan Kara <jack@...e.cz>, 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 Tue 20-05-25 21:35:12, Sergey Senozhatsky wrote:
> Once reply response is set for all outstanding requests
> wake_up_all() of the ->access_waitq waiters so that they
> can finish user-wait. Otherwise fsnotify_destroy_group()
> can wait forever for ->user_waits to reach 0 (which it
> never will.)
>
> Signed-off-by: Sergey Senozhatsky <senozhatsky@...omium.org>
We don't use exclusive waits with access_waitq so wake_up() and
wake_up_all() should do the same thing?
Honza
> ---
> fs/notify/fanotify/fanotify_user.c | 4 ++--
> 1 file changed, 2 insertions(+), 2 deletions(-)
>
> diff --git a/fs/notify/fanotify/fanotify_user.c b/fs/notify/fanotify/fanotify_user.c
> index 87f861e9004f..95a3b843cbbf 100644
> --- a/fs/notify/fanotify/fanotify_user.c
> +++ b/fs/notify/fanotify/fanotify_user.c
> @@ -1046,8 +1046,8 @@ static int fanotify_release(struct inode *ignored, struct file *file)
> }
> spin_unlock(&group->notification_lock);
>
> - /* Response for all permission events it set, wakeup waiters */
> - wake_up(&group->fanotify_data.access_waitq);
> + /* Response for all permission events is set, wakeup waiters */
> + wake_up_all(&group->fanotify_data.access_waitq);
>
> /* matches the fanotify_init->fsnotify_alloc_group */
> fsnotify_destroy_group(group);
> --
> 2.49.0.1101.gccaa498523-goog
>
--
Jan Kara <jack@...e.com>
SUSE Labs, CR
Powered by blists - more mailing lists