Btrfs: assert page dirty bit on extent buffer pages

Just in case that someone breaks the rule that pages are dirty as long
as eb is dirty. The next patch will dirty the pages conditionally.

Signed-off-by: Liu Bo <bo.liu@linux.alibaba.com>
Reviewed-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
Liu Bo 2018-09-14 01:46:08 +08:00 committed by David Sterba
parent 98e6b1eb40
commit 51995c399b
1 changed files with 6 additions and 0 deletions

View File

@ -5176,6 +5176,12 @@ int set_extent_buffer_dirty(struct extent_buffer *eb)
for (i = 0; i < num_pages; i++)
set_page_dirty(eb->pages[i]);
#ifdef CONFIG_BTRFS_DEBUG
for (i = 0; i < num_pages; i++)
ASSERT(PageDirty(eb->pages[i]));
#endif
return was_dirty;
}