writeback: remove writeback_inodes_wbc
authorChristoph Hellwig <hch@lst.de>
Thu, 10 Jun 2010 10:07:27 +0000 (12:07 +0200)
committerJens Axboe <jaxboe@fusionio.com>
Tue, 6 Jul 2010 06:54:03 +0000 (08:54 +0200)
This was just an odd wrapper around writeback_inodes_wb.  Removing this
also allows to get rid of the bdi member of struct writeback_control
which was rather out of place there.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Jens Axboe <jaxboe@fusionio.com>
fs/afs/write.c
fs/btrfs/extent_io.c
fs/fs-writeback.c
include/linux/writeback.h
mm/backing-dev.c
mm/page-writeback.c

index 3dab9e9948d0f39a55a4ddaf22f4524bcb0ffb4a..722743b152d817e94d5ea44131c96026f45e6898 100644 (file)
@@ -680,7 +680,6 @@ int afs_writeback_all(struct afs_vnode *vnode)
 {
        struct address_space *mapping = vnode->vfs_inode.i_mapping;
        struct writeback_control wbc = {
-               .bdi            = mapping->backing_dev_info,
                .sync_mode      = WB_SYNC_ALL,
                .nr_to_write    = LONG_MAX,
                .range_cyclic   = 1,
index a4080c21ec55377b4e5e60fc5bc8fa59e032a1ee..d74e6af9b53a598a26bf83357f1bed61d2103ef2 100644 (file)
@@ -2594,7 +2594,6 @@ int extent_write_full_page(struct extent_io_tree *tree, struct page *page,
                .sync_io = wbc->sync_mode == WB_SYNC_ALL,
        };
        struct writeback_control wbc_writepages = {
-               .bdi            = wbc->bdi,
                .sync_mode      = wbc->sync_mode,
                .older_than_this = NULL,
                .nr_to_write    = 64,
@@ -2628,7 +2627,6 @@ int extent_write_locked_range(struct extent_io_tree *tree, struct inode *inode,
                .sync_io = mode == WB_SYNC_ALL,
        };
        struct writeback_control wbc_writepages = {
-               .bdi            = inode->i_mapping->backing_dev_info,
                .sync_mode      = mode,
                .older_than_this = NULL,
                .nr_to_write    = nr_pages * 2,
index 6981e4b7c1480fa0dc2f3e502f971a1b4c9aeb09..94a602e98bb599fde79589603fd467097a118a3f 100644 (file)
@@ -614,8 +614,8 @@ static int writeback_sb_inodes(struct super_block *sb,
        return 1;
 }
 
-static void writeback_inodes_wb(struct bdi_writeback *wb,
-                               struct writeback_control *wbc)
+void writeback_inodes_wb(struct bdi_writeback *wb,
+               struct writeback_control *wbc)
 {
        int ret = 0;
 
@@ -660,13 +660,6 @@ static void writeback_inodes_wb(struct bdi_writeback *wb,
        /* Leave any unwritten inodes on b_io */
 }
 
-void writeback_inodes_wbc(struct writeback_control *wbc)
-{
-       struct backing_dev_info *bdi = wbc->bdi;
-
-       writeback_inodes_wb(&bdi->wb, wbc);
-}
-
 /*
  * The maximum number of pages to writeout in a single bdi flush/kupdate
  * 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,
                         struct wb_writeback_args *args)
 {
        struct writeback_control wbc = {
-               .bdi                    = wb->bdi,
                .sb                     = args->sb,
                .sync_mode              = args->sync_mode,
                .older_than_this        = NULL,
index d63ef8f9609fde16ee9bbbcfea4d9c30818c0dd6..f6756f6a610c052297223d15a36a4be62c06b04d 100644 (file)
@@ -27,8 +27,6 @@ enum writeback_sync_modes {
  * in a manner such that unspecified fields are set to zero.
  */
 struct writeback_control {
-       struct backing_dev_info *bdi;   /* If !NULL, only write back this
-                                          queue */
        struct super_block *sb;         /* if !NULL, only write inodes from
                                           this super_block */
        enum writeback_sync_modes sync_mode;
@@ -66,7 +64,8 @@ int inode_wait(void *);
 void writeback_inodes_sb(struct super_block *);
 int writeback_inodes_sb_if_idle(struct super_block *);
 void sync_inodes_sb(struct super_block *);
-void writeback_inodes_wbc(struct writeback_control *wbc);
+void writeback_inodes_wb(struct bdi_writeback *wb,
+               struct writeback_control *wbc);
 long wb_do_writeback(struct bdi_writeback *wb, int force_wait);
 void wakeup_flusher_threads(long nr_pages);
 
index 660a87a2251189e00b83a954ec6ab13679f38bc1..6e0b09a1ec2cd2fad0f582d8fdb1cddad60ebc2f 100644 (file)
@@ -340,14 +340,13 @@ int bdi_has_dirty_io(struct backing_dev_info *bdi)
 static void bdi_flush_io(struct backing_dev_info *bdi)
 {
        struct writeback_control wbc = {
-               .bdi                    = bdi,
                .sync_mode              = WB_SYNC_NONE,
                .older_than_this        = NULL,
                .range_cyclic           = 1,
                .nr_to_write            = 1024,
        };
 
-       writeback_inodes_wbc(&wbc);
+       writeback_inodes_wb(&bdi->wb, &wbc);
 }
 
 /*
index 54f28bd493d3f6a04f437d6294d54a322daa4603..37498ef6154836943f3478304bf7440ab255669a 100644 (file)
@@ -495,7 +495,6 @@ static void balance_dirty_pages(struct address_space *mapping,
 
        for (;;) {
                struct writeback_control wbc = {
-                       .bdi            = bdi,
                        .sync_mode      = WB_SYNC_NONE,
                        .older_than_this = NULL,
                        .nr_to_write    = write_chunk,
@@ -537,7 +536,7 @@ static void balance_dirty_pages(struct address_space *mapping,
                 * up.
                 */
                if (bdi_nr_reclaimable > bdi_thresh) {
-                       writeback_inodes_wbc(&wbc);
+                       writeback_inodes_wb(&bdi->wb, &wbc);
                        pages_written += write_chunk - wbc.nr_to_write;
                        get_dirty_limits(&background_thresh, &dirty_thresh,
                                       &bdi_thresh, bdi);