diff options
Diffstat (limited to 'fs/fs-writeback.c')
-rw-r--r-- | fs/fs-writeback.c | 28 |
1 files changed, 1 insertions, 27 deletions
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c index 9d5360c4c2af..49bc1b8e8f19 100644 --- a/fs/fs-writeback.c +++ b/fs/fs-writeback.c | |||
@@ -614,7 +614,6 @@ static void writeback_inodes_wb(struct bdi_writeback *wb, | |||
614 | struct writeback_control *wbc) | 614 | struct writeback_control *wbc) |
615 | { | 615 | { |
616 | struct super_block *sb = wbc->sb, *pin_sb = NULL; | 616 | struct super_block *sb = wbc->sb, *pin_sb = NULL; |
617 | const int is_blkdev_sb = sb_is_blkdev_sb(sb); | ||
618 | const unsigned long start = jiffies; /* livelock avoidance */ | 617 | const unsigned long start = jiffies; /* livelock avoidance */ |
619 | 618 | ||
620 | spin_lock(&inode_lock); | 619 | spin_lock(&inode_lock); |
@@ -635,36 +634,11 @@ static void writeback_inodes_wb(struct bdi_writeback *wb, | |||
635 | continue; | 634 | continue; |
636 | } | 635 | } |
637 | 636 | ||
638 | if (!bdi_cap_writeback_dirty(wb->bdi)) { | ||
639 | redirty_tail(inode); | ||
640 | if (is_blkdev_sb) { | ||
641 | /* | ||
642 | * Dirty memory-backed blockdev: the ramdisk | ||
643 | * driver does this. Skip just this inode | ||
644 | */ | ||
645 | continue; | ||
646 | } | ||
647 | /* | ||
648 | * Dirty memory-backed inode against a filesystem other | ||
649 | * than the kernel-internal bdev filesystem. Skip the | ||
650 | * entire superblock. | ||
651 | */ | ||
652 | break; | ||
653 | } | ||
654 | |||
655 | if (inode->i_state & (I_NEW | I_WILL_FREE)) { | 637 | if (inode->i_state & (I_NEW | I_WILL_FREE)) { |
656 | requeue_io(inode); | 638 | requeue_io(inode); |
657 | continue; | 639 | continue; |
658 | } | 640 | } |
659 | 641 | ||
660 | if (wbc->nonblocking && bdi_write_congested(wb->bdi)) { | ||
661 | wbc->encountered_congestion = 1; | ||
662 | if (!is_blkdev_sb) | ||
663 | break; /* Skip a congested fs */ | ||
664 | requeue_io(inode); | ||
665 | continue; /* Skip a congested blockdev */ | ||
666 | } | ||
667 | |||
668 | /* | 642 | /* |
669 | * Was this inode dirtied after sync_sb_inodes was called? | 643 | * Was this inode dirtied after sync_sb_inodes was called? |
670 | * This keeps sync from extra jobs and livelock. | 644 | * This keeps sync from extra jobs and livelock. |
@@ -756,6 +730,7 @@ static long wb_writeback(struct bdi_writeback *wb, | |||
756 | .sync_mode = args->sync_mode, | 730 | .sync_mode = args->sync_mode, |
757 | .older_than_this = NULL, | 731 | .older_than_this = NULL, |
758 | .for_kupdate = args->for_kupdate, | 732 | .for_kupdate = args->for_kupdate, |
733 | .for_background = args->for_background, | ||
759 | .range_cyclic = args->range_cyclic, | 734 | .range_cyclic = args->range_cyclic, |
760 | }; | 735 | }; |
761 | unsigned long oldest_jif; | 736 | unsigned long oldest_jif; |
@@ -787,7 +762,6 @@ static long wb_writeback(struct bdi_writeback *wb, | |||
787 | break; | 762 | break; |
788 | 763 | ||
789 | wbc.more_io = 0; | 764 | wbc.more_io = 0; |
790 | wbc.encountered_congestion = 0; | ||
791 | wbc.nr_to_write = MAX_WRITEBACK_PAGES; | 765 | wbc.nr_to_write = MAX_WRITEBACK_PAGES; |
792 | wbc.pages_skipped = 0; | 766 | wbc.pages_skipped = 0; |
793 | writeback_inodes_wb(wb, &wbc); | 767 | writeback_inodes_wb(wb, &wbc); |