提交 ffa0aea6 编写于 作者: P Paolo 'Blaisorblade' Giarrusso 提交者: Linus Torvalds

[PATCH] uml - hostfs: avoid buffers

Use this:
	.set_page_dirty = __set_page_dirty_nobuffers,

We already dropped the inclusion of <linux/buffer_head.h>, and we don't have a
backing block device for this FS.

"Without having looked at it, I'm sure that hostfs does not use buffer_heads.
So setting your ->set_page_dirty a_op to point at __set_page_dirty_nobuffers()
is a reasonable thing to do - it'll provide a slight speedup."

This speedup is one less spinlock held and one less conditional branch, which
isn't bad.
Signed-off-by: NPaolo 'Blaisorblade' Giarrusso <blaisorblade@yahoo.it>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 b97b77cc
......@@ -521,7 +521,7 @@ int hostfs_commit_write(struct file *file, struct page *page, unsigned from,
static struct address_space_operations hostfs_aops = {
.writepage = hostfs_writepage,
.readpage = hostfs_readpage,
/* .set_page_dirty = __set_page_dirty_nobuffers, */
.set_page_dirty = __set_page_dirty_nobuffers,
.prepare_write = hostfs_prepare_write,
.commit_write = hostfs_commit_write
};
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册