aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/afs/write.c1
-rw-r--r--fs/btrfs/extent_io.c2
-rw-r--r--fs/fs-writeback.c12
-rw-r--r--include/linux/writeback.h5
-rw-r--r--mm/backing-dev.c3
-rw-r--r--mm/page-writeback.c3
6 files changed, 6 insertions, 20 deletions
diff --git a/fs/afs/write.c b/fs/afs/write.c
index 3dab9e9948d0..722743b152d8 100644
--- a/fs/afs/write.c
+++ b/fs/afs/write.c
@@ -680,7 +680,6 @@ int afs_writeback_all(struct afs_vnode *vnode)
680{ 680{
681 struct address_space *mapping = vnode->vfs_inode.i_mapping; 681 struct address_space *mapping = vnode->vfs_inode.i_mapping;
682 struct writeback_control wbc = { 682 struct writeback_control wbc = {
683 .bdi = mapping->backing_dev_info,
684 .sync_mode = WB_SYNC_ALL, 683 .sync_mode = WB_SYNC_ALL,
685 .nr_to_write = LONG_MAX, 684 .nr_to_write = LONG_MAX,
686 .range_cyclic = 1, 685 .range_cyclic = 1,
diff --git a/fs/btrfs/extent_io.c b/fs/btrfs/extent_io.c
index a4080c21ec55..d74e6af9b53a 100644
--- a/fs/btrfs/extent_io.c
+++ b/fs/btrfs/extent_io.c
@@ -2594,7 +2594,6 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
2594 .sync_io = wbc->sync_mode == WB_SYNC_ALL, 2594 .sync_io = wbc->sync_mode == WB_SYNC_ALL,
2595 }; 2595 };
2596 struct writeback_control wbc_writepages = { 2596 struct writeback_control wbc_writepages = {
2597 .bdi = wbc->bdi,
2598 .sync_mode = wbc->sync_mode, 2597 .sync_mode = wbc->sync_mode,
2599 .older_than_this = NULL, 2598 .older_than_this = NULL,
2600 .nr_to_write = 64, 2599 .nr_to_write = 64,
@@ -2628,7 +2627,6 @@ int extent_write_locked_range(struct extent_io_tree *tree, struct inode *inode,
2628 .sync_io = mode == WB_SYNC_ALL, 2627 .sync_io = mode == WB_SYNC_ALL,
2629 }; 2628 };
2630 struct writeback_control wbc_writepages = { 2629 struct writeback_control wbc_writepages = {
2631 .bdi = inode->i_mapping->backing_dev_info,
2632 .sync_mode = mode, 2630 .sync_mode = mode,
2633 .older_than_this = NULL, 2631 .older_than_this = NULL,
2634 .nr_to_write = nr_pages * 2, 2632 .nr_to_write = nr_pages * 2,
diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index 6981e4b7c148..94a602e98bb5 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -614,8 +614,8 @@ static int writeback_sb_inodes(struct super_block *sb,
614 return 1; 614 return 1;
615} 615}
616 616
617static void writeback_inodes_wb(struct bdi_writeback *wb, 617void writeback_inodes_wb(struct bdi_writeback *wb,
618 struct writeback_control *wbc) 618 struct writeback_control *wbc)
619{ 619{
620 int ret = 0; 620 int ret = 0;
621 621
@@ -660,13 +660,6 @@ static void writeback_inodes_wb(struct bdi_writeback *wb,
660 /* Leave any unwritten inodes on b_io */ 660 /* Leave any unwritten inodes on b_io */
661} 661}
662 662
663void writeback_inodes_wbc(struct writeback_control *wbc)
664{
665 struct backing_dev_info *bdi = wbc->bdi;
666
667 writeback_inodes_wb(&bdi->wb, wbc);
668}
669
670/* 663/*
671 * The maximum number of pages to writeout in a single bdi flush/kupdate 664 * The maximum number of pages to writeout in a single bdi flush/kupdate
672 * operation. We do this so we don't hold I_SYNC against an inode for 665 * operation. We do this so we don't hold I_SYNC against an inode for
@@ -705,7 +698,6 @@ static long wb_writeback(struct bdi_writeback *wb,
705 struct wb_writeback_args *args) 698 struct wb_writeback_args *args)
706{ 699{
707 struct writeback_control wbc = { 700 struct writeback_control wbc = {
708 .bdi = wb->bdi,
709 .sb = args->sb, 701 .sb = args->sb,
710 .sync_mode = args->sync_mode, 702 .sync_mode = args->sync_mode,
711 .older_than_this = NULL, 703 .older_than_this = NULL,
diff --git a/include/linux/writeback.h b/include/linux/writeback.h
index d63ef8f9609f..f6756f6a610c 100644
--- a/include/linux/writeback.h
+++ b/include/linux/writeback.h
@@ -27,8 +27,6 @@ enum writeback_sync_modes {
27 * in a manner such that unspecified fields are set to zero. 27 * in a manner such that unspecified fields are set to zero.
28 */ 28 */
29struct writeback_control { 29struct writeback_control {
30 struct backing_dev_info *bdi; /* If !NULL, only write back this
31 queue */
32 struct super_block *sb; /* if !NULL, only write inodes from 30 struct super_block *sb; /* if !NULL, only write inodes from
33 this super_block */ 31 this super_block */
34 enum writeback_sync_modes sync_mode; 32 enum writeback_sync_modes sync_mode;
@@ -66,7 +64,8 @@ int inode_wait(void *);
66void writeback_inodes_sb(struct super_block *); 64void writeback_inodes_sb(struct super_block *);
67int writeback_inodes_sb_if_idle(struct super_block *); 65int writeback_inodes_sb_if_idle(struct super_block *);
68void sync_inodes_sb(struct super_block *); 66void sync_inodes_sb(struct super_block *);
69void writeback_inodes_wbc(struct writeback_control *wbc); 67void writeback_inodes_wb(struct bdi_writeback *wb,
68 struct writeback_control *wbc);
70long wb_do_writeback(struct bdi_writeback *wb, int force_wait); 69long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
71void wakeup_flusher_threads(long nr_pages); 70void wakeup_flusher_threads(long nr_pages);
72 71
diff --git a/mm/backing-dev.c b/mm/backing-dev.c
index 660a87a22511..6e0b09a1ec2c 100644
--- a/mm/backing-dev.c
+++ b/mm/backing-dev.c
@@ -340,14 +340,13 @@ int bdi_has_dirty_io(struct backing_dev_info *bdi)
340static void bdi_flush_io(struct backing_dev_info *bdi) 340static void bdi_flush_io(struct backing_dev_info *bdi)
341{ 341{
342 struct writeback_control wbc = { 342 struct writeback_control wbc = {
343 .bdi = bdi,
344 .sync_mode = WB_SYNC_NONE, 343 .sync_mode = WB_SYNC_NONE,
345 .older_than_this = NULL, 344 .older_than_this = NULL,
346 .range_cyclic = 1, 345 .range_cyclic = 1,
347 .nr_to_write = 1024, 346 .nr_to_write = 1024,
348 }; 347 };
349 348
350 writeback_inodes_wbc(&wbc); 349 writeback_inodes_wb(&bdi->wb, &wbc);
351} 350}
352 351
353/* 352/*
diff --git a/mm/page-writeback.c b/mm/page-writeback.c
index 54f28bd493d3..37498ef61548 100644
--- a/mm/page-writeback.c
+++ b/mm/page-writeback.c
@@ -495,7 +495,6 @@ static void balance_dirty_pages(struct address_space *mapping,
495 495
496 for (;;) { 496 for (;;) {
497 struct writeback_control wbc = { 497 struct writeback_control wbc = {
498 .bdi = bdi,
499 .sync_mode = WB_SYNC_NONE, 498 .sync_mode = WB_SYNC_NONE,
500 .older_than_this = NULL, 499 .older_than_this = NULL,
501 .nr_to_write = write_chunk, 500 .nr_to_write = write_chunk,
@@ -537,7 +536,7 @@ static void balance_dirty_pages(struct address_space *mapping,
537 * up. 536 * up.
538 */ 537 */
539 if (bdi_nr_reclaimable > bdi_thresh) { 538 if (bdi_nr_reclaimable > bdi_thresh) {
540 writeback_inodes_wbc(&wbc); 539 writeback_inodes_wb(&bdi->wb, &wbc);
541 pages_written += write_chunk - wbc.nr_to_write; 540 pages_written += write_chunk - wbc.nr_to_write;
542 get_dirty_limits(&background_thresh, &dirty_thresh, 541 get_dirty_limits(&background_thresh, &dirty_thresh,
543 &bdi_thresh, bdi); 542 &bdi_thresh, bdi);