dm: avoid needless dm_io access if all IO accounting is disabled
authorMike Snitzer <snitzer@kernel.org>
Tue, 13 Jun 2023 19:19:42 +0000 (15:19 -0400)
committerMike Snitzer <snitzer@kernel.org>
Fri, 16 Jun 2023 22:24:13 +0000 (18:24 -0400)
commit06eed768ea64c7a128582efda4f6107cb14ee962
tree8954f226c6c973278de85def4442dbd733fffd12
parent526d10061bc29b314cc41f3b8322606df9172f14
dm: avoid needless dm_io access if all IO accounting is disabled

Update dm_io_acct() to eliminate most dm_io struct accesses if both
block core's IO stats and dm-stats are disabled.

Signed-off-by: Mike Snitzer <snitzer@kernel.org>
drivers/md/dm.c