All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] fanotify: simplify fanotify_error_event_equal
@ 2026-05-27 14:22 Thorsten Blum
  2026-05-28 13:09 ` Jan Kara
  0 siblings, 1 reply; 2+ messages in thread
From: Thorsten Blum @ 2026-05-27 14:22 UTC (permalink / raw)
  To: Jan Kara, Amir Goldstein, Matthew Bobrowski
  Cc: Thorsten Blum, linux-fsdevel, linux-kernel

Return the result of calling fanotify_fsid_equal() directly to simplify
the code.

Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>
---
 fs/notify/fanotify/fanotify.c | 5 +----
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
index 38290b9c07f7..8ed77901db57 100644
--- a/fs/notify/fanotify/fanotify.c
+++ b/fs/notify/fanotify/fanotify.c
@@ -120,10 +120,7 @@ static bool fanotify_error_event_equal(struct fanotify_error_event *fee1,
 				       struct fanotify_error_event *fee2)
 {
 	/* Error events against the same file system are always merged. */
-	if (!fanotify_fsid_equal(&fee1->fsid, &fee2->fsid))
-		return false;
-
-	return true;
+	return fanotify_fsid_equal(&fee1->fsid, &fee2->fsid);
 }
 
 static bool fanotify_should_merge(struct fanotify_event *old,

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* Re: [PATCH] fanotify: simplify fanotify_error_event_equal
  2026-05-27 14:22 [PATCH] fanotify: simplify fanotify_error_event_equal Thorsten Blum
@ 2026-05-28 13:09 ` Jan Kara
  0 siblings, 0 replies; 2+ messages in thread
From: Jan Kara @ 2026-05-28 13:09 UTC (permalink / raw)
  To: Thorsten Blum
  Cc: Jan Kara, Amir Goldstein, Matthew Bobrowski, linux-fsdevel,
	linux-kernel

On Wed 27-05-26 16:22:35, Thorsten Blum wrote:
> Return the result of calling fanotify_fsid_equal() directly to simplify
> the code.
> 
> Signed-off-by: Thorsten Blum <thorsten.blum@linux.dev>

Thanks. I've added the patch to my tree.

								Honza

> ---
>  fs/notify/fanotify/fanotify.c | 5 +----
>  1 file changed, 1 insertion(+), 4 deletions(-)
> 
> diff --git a/fs/notify/fanotify/fanotify.c b/fs/notify/fanotify/fanotify.c
> index 38290b9c07f7..8ed77901db57 100644
> --- a/fs/notify/fanotify/fanotify.c
> +++ b/fs/notify/fanotify/fanotify.c
> @@ -120,10 +120,7 @@ static bool fanotify_error_event_equal(struct fanotify_error_event *fee1,
>  				       struct fanotify_error_event *fee2)
>  {
>  	/* Error events against the same file system are always merged. */
> -	if (!fanotify_fsid_equal(&fee1->fsid, &fee2->fsid))
> -		return false;
> -
> -	return true;
> +	return fanotify_fsid_equal(&fee1->fsid, &fee2->fsid);
>  }
>  
>  static bool fanotify_should_merge(struct fanotify_event *old,
-- 
Jan Kara <jack@suse.com>
SUSE Labs, CR

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2026-05-28 13:09 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-05-27 14:22 [PATCH] fanotify: simplify fanotify_error_event_equal Thorsten Blum
2026-05-28 13:09 ` Jan Kara

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.