aboutsummaryrefslogtreecommitdiffstats
path: root/fs/btrfs/extent_io.c
diff options
context:
space:
mode:
authorChris Mason <chris.mason@oracle.com>2008-11-20 10:46:35 -0500
committerChris Mason <chris.mason@oracle.com>2008-11-20 10:46:35 -0500
commit0e6bd956ed238eb2f69386f251847fe3163532e1 (patch)
tree72b99621e0d4f187aca1214b0a5faa9a71768efd /fs/btrfs/extent_io.c
parent43dd729b862f4a053310f75d3ee559b678772f59 (diff)
Btrfs: only flush down bios for writeback pages
The btrfs write_cache_pages call has a flush function so that it submits the bio it has been building before it waits on any writeback pages. This adds a check so that flush only happens on writeback pages. Signed-off-by: Chris Mason <chris.mason@oracle.com>
Diffstat (limited to 'fs/btrfs/extent_io.c')
-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:
2462 } 2462 }
2463 2463
2464 if (wbc->sync_mode != WB_SYNC_NONE) { 2464 if (wbc->sync_mode != WB_SYNC_NONE) {
2465 flush_fn(data); 2465 if (PageWriteback(page))
2466 flush_fn(data);
2466 wait_on_page_writeback(page); 2467 wait_on_page_writeback(page);
2467 } 2468 }
2468 2469