diff options
author | John Garry <john.g.garry@oracle.com> | 2025-02-24 15:45:38 +0000 |
---|---|---|
committer | Christian Brauner <brauner@kernel.org> | 2025-02-25 11:55:26 +0100 |
commit | b5799106b44e1df594f4696500dbbc3b326bba18 (patch) | |
tree | 2385ed532109f22cf7723348349e53b293b7e2ac | |
parent | 425e3e3bd62c568a4365af0923d6ebad71a7dcfc (diff) |
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 c3b0e880bbfa ("iomap: support
REQ_OP_ZONE_APPEND").
Signed-off-by: John Garry <john.g.garry@oracle.com>
Link: https://lore.kernel.org/r/20250224154538.548028-1-john.g.garry@oracle.com
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Christian Brauner <brauner@kernel.org>
-rw-r--r-- | fs/iomap/direct-io.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/fs/iomap/direct-io.c b/fs/iomap/direct-io.c index b521eb15759e8..0e47da82b0c24 100644 --- a/fs/iomap/direct-io.c +++ b/fs/iomap/direct-io.c @@ -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) - bio_set_pages_dirty(bio); - } + else if (dio->flags & IOMAP_DIO_DIRTY) + bio_set_pages_dirty(bio); dio->size += n; copied += n; |