Skip to content

Commit b579910

Browse files
johnpgarrybrauner
authored andcommitted
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 c3b0e88 ("iomap: support REQ_OP_ZONE_APPEND"). Signed-off-by: John Garry <[email protected]> Link: https://lore.kernel.org/r/[email protected] Reviewed-by: "Darrick J. Wong" <[email protected]> Signed-off-by: Christian Brauner <[email protected]>
1 parent 425e3e3 commit b579910

File tree

1 file changed

+3
-5
lines changed

1 file changed

+3
-5
lines changed

Diff for: fs/iomap/direct-io.c

+3-5
Original file line numberDiff line numberDiff line change
@@ -427,12 +427,10 @@ static loff_t iomap_dio_bio_iter(const struct iomap_iter *iter,
427427
bio_put(bio);
428428
goto zero_tail;
429429
}
430-
if (dio->flags & IOMAP_DIO_WRITE) {
430+
if (dio->flags & IOMAP_DIO_WRITE)
431431
task_io_account_write(n);
432-
} else {
433-
if (dio->flags & IOMAP_DIO_DIRTY)
434-
bio_set_pages_dirty(bio);
435-
}
432+
else if (dio->flags & IOMAP_DIO_DIRTY)
433+
bio_set_pages_dirty(bio);
436434

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

0 commit comments

Comments
 (0)