diff options
author | Liu Bo <[email protected]> | 2018-09-14 01:46:08 +0800 |
---|---|---|
committer | David Sterba <[email protected]> | 2018-10-15 17:23:30 +0200 |
commit | 51995c399b73dacb9d84375ad5a8fda3aced03ab (patch) | |
tree | 6195dab5e05aa2ccdd1d249f064cc5d9e60bf761 | |
parent | 98e6b1eb4022f2eb9845f0da5f16c179e5f32b9f (diff) |
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 <[email protected]>
Reviewed-by: Nikolay Borisov <[email protected]>
Reviewed-by: David Sterba <[email protected]>
Signed-off-by: David Sterba <[email protected]>
-rw-r--r-- | fs/btrfs/extent_io.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 43bf4ec891c6..ce2aa692b444 100644 --- a/fs/btrfs/extent_io.c +++ b/fs/btrfs/extent_io.c @@ -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; } |