[PATCH 01/16] writeback: remove the always false bdi_cap_writeback_dirty() test

Stefan Bader stefan.bader at canonical.com
Tue Aug 10 09:28:49 UTC 2010


From: Wu Fengguang <fengguang.wu at gmail.com>

BugLink: http://bugs.launchpad.net/bugs/585092

commit 951c30d135390a108f102b0f6e3cfa6241f2a1aa upstream

This is dead code because no bdi flush thread will be started for
!bdi_cap_writeback_dirty bdi.

Signed-off-by: Wu Fengguang <fengguang.wu at intel.com>
Cc: Jens Axboe <jens.axboe at oracle.com>
Cc: Trond Myklebust <Trond.Myklebust at netapp.com>
Cc: Christoph Hellwig <hch at infradead.org>
Signed-off-by: Jens Axboe <jens.axboe at oracle.com>
Signed-off-by: Stefan Bader <stefan.bader at canonical.com>
---
 fs/fs-writeback.c |   18 ------------------
 1 files changed, 0 insertions(+), 18 deletions(-)

diff --git a/fs/fs-writeback.c b/fs/fs-writeback.c
index ef2acd2..596a43d 100644
--- a/fs/fs-writeback.c
+++ b/fs/fs-writeback.c
@@ -614,7 +614,6 @@ static void writeback_inodes_wb(struct bdi_writeback *wb,
 				struct writeback_control *wbc)
 {
 	struct super_block *sb = wbc->sb, *pin_sb = NULL;
-	const int is_blkdev_sb = sb_is_blkdev_sb(sb);
 	const unsigned long start = jiffies;	/* livelock avoidance */
 
 	spin_lock(&inode_lock);
@@ -635,23 +634,6 @@ static void writeback_inodes_wb(struct bdi_writeback *wb,
 			continue;
 		}
 
-		if (!bdi_cap_writeback_dirty(wb->bdi)) {
-			redirty_tail(inode);
-			if (is_blkdev_sb) {
-				/*
-				 * Dirty memory-backed blockdev: the ramdisk
-				 * driver does this.  Skip just this inode
-				 */
-				continue;
-			}
-			/*
-			 * Dirty memory-backed inode against a filesystem other
-			 * than the kernel-internal bdev filesystem.  Skip the
-			 * entire superblock.
-			 */
-			break;
-		}
-
 		if (inode->i_state & (I_NEW | I_WILL_FREE)) {
 			requeue_io(inode);
 			continue;
-- 
1.7.0.4





More information about the kernel-team mailing list