Unverified Commit b5799106 authored by John Garry's avatar John Garry Committed by Christian Brauner
Browse files

iomap: Minor code simplification in iomap_dio_bio_iter()



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 c3b0e880 ("iomap: support
REQ_OP_ZONE_APPEND").

Signed-off-by: default avatarJohn Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20250224154538.548028-1-john.g.garry@oracle.com


Reviewed-by: default avatar"Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: default avatarChristian Brauner <brauner@kernel.org>
parent 425e3e3b
Loading
Loading
Loading
Loading
+3 −5
Original line number Diff line number Diff line
@@ -427,12 +427,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)
		else if (dio->flags & IOMAP_DIO_DIRTY)
			bio_set_pages_dirty(bio);
		}

		dio->size += n;
		copied += n;