aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
Diffstat (limited to 'fs')
-rw-r--r--fs/fs-writeback.c12
1 files changed, 2 insertions, 10 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index d0ff0b8cf30..d99601af9e4 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -421,9 +421,6 @@ __writeback_single_inode(struct inode *inode, struct writeback_control *wbc)
421 * If we're a pdlfush thread, then implement pdflush collision avoidance 421 * If we're a pdlfush thread, then implement pdflush collision avoidance
422 * against the entire list. 422 * against the entire list.
423 * 423 *
424 * WB_SYNC_HOLD is a hack for sys_sync(): reattach the inode to sb->s_dirty so
425 * that it can be located for waiting on in __writeback_single_inode().
426 *
427 * If `bdi' is non-zero then we're being asked to writeback a specific queue. 424 * If `bdi' is non-zero then we're being asked to writeback a specific queue.
428 * This function assumes that the blockdev superblock's inodes are backed by 425 * This function assumes that the blockdev superblock's inodes are backed by
429 * a variety of queues, so all inodes are searched. For other superblocks, 426 * a variety of queues, so all inodes are searched. For other superblocks,
@@ -499,10 +496,6 @@ void generic_sync_sb_inodes(struct super_block *sb,
499 __iget(inode); 496 __iget(inode);
500 pages_skipped = wbc->pages_skipped; 497 pages_skipped = wbc->pages_skipped;
501 __writeback_single_inode(inode, wbc); 498 __writeback_single_inode(inode, wbc);
502 if (wbc->sync_mode == WB_SYNC_HOLD) {
503 inode->dirtied_when = jiffies;
504 list_move(&inode->i_list, &sb->s_dirty);
505 }
506 if (current_is_pdflush()) 499 if (current_is_pdflush())
507 writeback_release(bdi); 500 writeback_release(bdi);
508 if (wbc->pages_skipped != pages_skipped) { 501 if (wbc->pages_skipped != pages_skipped) {
@@ -588,8 +581,7 @@ restart:
588 581
589/* 582/*
590 * writeback and wait upon the filesystem's dirty inodes. The caller will 583 * writeback and wait upon the filesystem's dirty inodes. The caller will
591 * do this in two passes - one to write, and one to wait. WB_SYNC_HOLD is 584 * do this in two passes - one to write, and one to wait.
592 * used to park the written inodes on sb->s_dirty for the wait pass.
593 * 585 *
594 * A finite limit is set on the number of pages which will be written. 586 * A finite limit is set on the number of pages which will be written.
595 * To prevent infinite livelock of sys_sync(). 587 * To prevent infinite livelock of sys_sync().
@@ -600,7 +592,7 @@ restart:
600void sync_inodes_sb(struct super_block *sb, int wait) 592void sync_inodes_sb(struct super_block *sb, int wait)
601{ 593{
602 struct writeback_control wbc = { 594 struct writeback_control wbc = {
603 .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_HOLD, 595 .sync_mode = wait ? WB_SYNC_ALL : WB_SYNC_NONE,
604 .range_start = 0, 596 .range_start = 0,
605 .range_end = LLONG_MAX, 597 .range_end = LLONG_MAX,
606 }; 598 };