aboutsummaryrefslogtreecommitdiffstats
path: root/fs/fs-writeback.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r--fs/fs-writeback.c16
1 files changed, 8 insertions, 8 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index e4504299f4a5..271cf2150ba0 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -739,23 +739,23 @@ static long wb_writeback(struct bdi_writeback *wb,
739 wrote += write_chunk - wbc.nr_to_write; 739 wrote += write_chunk - wbc.nr_to_write;
740 740
741 /* 741 /*
742 * If we consumed everything, see if we have more 742 * Did we write something? Try for more
743 *
744 * Dirty inodes are moved to b_io for writeback in batches.
745 * The completion of the current batch does not necessarily
746 * mean the overall work is done. So we keep looping as long
747 * as made some progress on cleaning pages or inodes.
743 */ 748 */
744 if (wbc.nr_to_write <= 0) 749 if (wbc.nr_to_write < write_chunk)
745 continue; 750 continue;
746 if (wbc.inodes_written) 751 if (wbc.inodes_written)
747 continue; 752 continue;
748 /* 753 /*
749 * Didn't write everything and we don't have more IO, bail 754 * No more inodes for IO, bail
750 */ 755 */
751 if (!wbc.more_io) 756 if (!wbc.more_io)
752 break; 757 break;
753 /* 758 /*
754 * Did we write something? Try for more
755 */
756 if (wbc.nr_to_write < write_chunk)
757 continue;
758 /*
759 * Nothing written. Wait for some inode to 759 * Nothing written. Wait for some inode to
760 * become available for writeback. Otherwise 760 * become available for writeback. Otherwise
761 * we'll just busyloop. 761 * we'll just busyloop.