summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/btrfs/extent_io.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index 3a65c10dce33..87dba8517935 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2462,7 +2462,8 @@ retry:
}
if (wbc->sync_mode != WB_SYNC_NONE) {
- flush_fn(data);
+ if (PageWriteback(page))
+ flush_fn(data);
wait_on_page_writeback(page);
}