Commit 7b365a2a authored by Minjie Du's avatar Minjie Du Committed by David Sterba
Browse files

btrfs: use folio_next_index() helper in extent_write_cache_pages



Simplify code pattern of 'folio->index + folio_nr_pages(folio)' by using
the existing helper folio_next_index().

Reviewed-by: default avatarJohannes Thumshirn <johannes.thumshirn@wdc.com>
Signed-off-by: default avatarMinjie Du <duminjie@vivo.com>
Reviewed-by: default avatarDavid Sterba <dsterba@suse.com>
Signed-off-by: default avatarDavid Sterba <dsterba@suse.com>
parent 98efb4eb
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -2150,7 +2150,7 @@ static int extent_write_cache_pages(struct address_space *mapping,
		for (i = 0; i < nr_folios; i++) {
			struct folio *folio = fbatch.folios[i];

			done_index = folio->index + folio_nr_pages(folio);
			done_index = folio_next_index(folio);
			/*
			 * At this point we hold neither the i_pages lock nor
			 * the page lock: the page may be truncated or