From: David Chinner Date: Tue, 7 Feb 2006 09:27:24 +0000 (+1100) Subject: [XFS] Account for the page we just wrote when we detect congestion during X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=9fddaca2293d768eb21ea115e5eedec7f1c13c1c;p=GitHub%2FLineageOS%2FG12%2Fandroid_kernel_amlogic_linux-4.9.git [XFS] Account for the page we just wrote when we detect congestion during the clustering of extra pages in a buffered write. SGI-PV: 949210 SGI-Modid: xfs-linux-melb:xfs-kern:25130a Signed-off-by: David Chinner Signed-off-by: Nathan Scott --- diff --git a/fs/xfs/linux-2.6/xfs_aops.c b/fs/xfs/linux-2.6/xfs_aops.c index 9892268e3005..8f2beec526cf 100644 --- a/fs/xfs/linux-2.6/xfs_aops.c +++ b/fs/xfs/linux-2.6/xfs_aops.c @@ -747,10 +747,11 @@ xfs_convert_page( struct backing_dev_info *bdi; bdi = inode->i_mapping->backing_dev_info; + wbc->nr_to_write--; if (bdi_write_congested(bdi)) { wbc->encountered_congestion = 1; done = 1; - } else if (--wbc->nr_to_write <= 0) { + } else if (wbc->nr_to_write <= 0) { done = 1; } }