[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <20250224203953.GM21808@frogsfrogsfrogs>
Date: Mon, 24 Feb 2025 12:39:53 -0800
From: "Darrick J. Wong" <djwong@...nel.org>
To: John Garry <john.g.garry@...cle.com>
Cc: brauner@...nel.org, linux-xfs@...r.kernel.org,
linux-fsdevel@...r.kernel.org, linux-kernel@...r.kernel.org
Subject: Re: [PATCH] iomap: Minor code simplification in iomap_dio_bio_iter()
On Mon, Feb 24, 2025 at 03:45:38PM +0000, John Garry wrote:
> Combine 'else' and 'if' conditional statements onto a single line and drop
> unrequired braces, as is standard coding style.
>
> The code had been like this since commit c3b0e880bbfa ("iomap: support
> REQ_OP_ZONE_APPEND").
>
> Signed-off-by: John Garry <john.g.garry@...cle.com>
Looks fine to me,
Reviewed-by: "Darrick J. Wong" <djwong@...nel.org>
--D
>
> diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c
> index 138d246ec29d..cdcd5ff399c1 100644
> --- a/fs/iomap/direct-io.c
> +++ b/fs/iomap/direct-io.c
> @@ -473,12 +473,10 @@ static loff_t iomap_dio_bio_iter(const struct iomap_iter *iter,
> bio_put(bio);
> goto zero_tail;
> }
> - if (dio->flags & IOMAP_DIO_WRITE) {
> + if (dio->flags & IOMAP_DIO_WRITE)
> task_io_account_write(n);
> - } else {
> - if (dio->flags & IOMAP_DIO_DIRTY)
> - bio_set_pages_dirty(bio);
> - }
> + else if (dio->flags & IOMAP_DIO_DIRTY)
> + bio_set_pages_dirty(bio);
>
> dio->size += n;
> copied += n;
> --
> 2.31.1
>
>
Powered by blists - more mailing lists