Commit af583a5b authored by Andrew Morton's avatar Andrew Morton Committed by Linus Torvalds

[PATCH] memory-backed inodes fix

If an inode is backed by a memory-backed backing_dev, and it is not a blockdev
inode, we can skip the entire superblock duwing writeback scanning.
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 14bf6f7e
......@@ -304,14 +304,20 @@ sync_sb_inodes(struct super_block *sb, struct writeback_control *wbc)
long pages_skipped;
if (bdi->memory_backed) {
list_move(&inode->i_list, &sb->s_dirty);
if (sb == blockdev_superblock) {
/*
* Dirty memory-backed blockdev: the ramdisk
* driver does this.
* driver does this. Skip just this inode
*/
list_move(&inode->i_list, &sb->s_dirty);
continue;
}
/*
* Dirty memory-backed inode against a filesystem other
* than the kernel-internal bdev filesystem. Skip the
* entire superblock.
*/
break;
}
if (wbc->nonblocking && bdi_write_congested(bdi)) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment