btrfs: move writeback_control::nr_to_write update to __extent_writepage
authorChristoph Hellwig <hch@lst.de>
Wed, 31 May 2023 06:05:00 +0000 (08:05 +0200)
committerDavid Sterba <dsterba@suse.com>
Mon, 19 Jun 2023 11:59:35 +0000 (13:59 +0200)
commit9ecdbee819ca90589bf2efccfb90d5dabc0de057
tree93d94a62a41c05a8fedcad83090ee746e17a03f1
parentf22b5dcbd71edea087946511554956591557de9a
btrfs: move writeback_control::nr_to_write update to __extent_writepage

Move the nr_to_write accounting from __extent_writepage_io to
__extent_writepage_io as we'll grow another __extent_writepage_io that
doesn't want this accounting soon.  Also drop the obsolete comment -
decrementing a counter in the on-stack writeback_control data structure
doesn't need the page lock.

Reviewed-by: Anand Jain <anand.jain@oracle.com>
Reviewed-by: Josef Bacik <josef@toxicpanda.com>
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
fs/btrfs/extent_io.c