Skip to content

Commit

Permalink
Btrfs: assert page dirty bit on extent buffer pages
Browse files Browse the repository at this point in the history
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 <[email protected]>
Reviewed-by: Nikolay Borisov <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
  • Loading branch information
liubogithub authored and kdave committed Oct 15, 2018
1 parent 98e6b1e commit 51995c3
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions fs/btrfs/extent_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand Down

0 comments on commit 51995c3

Please sign in to comment.