From: Chris Mason Date: Thu, 20 Nov 2008 15:46:35 +0000 (-0500) Subject: Btrfs: only flush down bios for writeback pages X-Git-Tag: v2.6.29-rc1~27^2~9^2~49 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=0e6bd956ed238eb2f69386f251847fe3163532e1;p=linux-2.6-omap-h63xx.git 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 --- diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c index 3a65c10dce3..87dba851793 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); }