fs/notify/fanotify/fanotify.c | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-)
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,
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
© 2016 - 2026 Red Hat, Inc.