]> www.infradead.org Git - users/dwmw2/linux.git/commit
dm io: remove code duplication between sync_io and aysnc_io
authorBenjamin Marzinski <bmarzins@redhat.com>
Tue, 2 Jul 2024 10:00:43 +0000 (12:00 +0200)
committerMikulas Patocka <mpatocka@redhat.com>
Tue, 2 Jul 2024 10:00:43 +0000 (12:00 +0200)
commitbabe69e86d0fcb11a4a8f629edf2951d94ef67ae
tree9bce0224cbd5c3dba840336fb2da2474562a71af
parentb0042ba7684c90d9c8e7deb500c73d6ae3872cfe
dm io: remove code duplication between sync_io and aysnc_io

The only difference between the code to setup and dispatch the io in
sync_io() and async_io() is the sync argument to dispatch_io(), which
is used to update the opf argument.

Update the opf argument direcly in sync_io(), and remove the sync
argument from dispatch_io(). Then, make sync_io() call async_io()
instead of duplicting all of its code.

Signed-off-by: Benjamin Marzinski <bmarzins@redhat.com>
Signed-off-by: Mikulas Patocka <mpatocka@redhat.com>
drivers/md/dm-io.c