提交 34ef75f0 编写于 作者: N Neil Brown 提交者: Linus Torvalds

[PATCH] md: don't pass a NULL file* into ->prepare_write()

Some filesystems go oops.
Signed-off-by: NNeil Brown <neilb@suse.de>
Signed-off-by: NAndrew Morton <akpm@osdl.org>
Signed-off-by: NLinus Torvalds <torvalds@osdl.org>
上级 c4b32b8b
......@@ -326,9 +326,9 @@ static int write_page(struct bitmap *bitmap, struct page *page, int wait)
}
}
ret = page->mapping->a_ops->prepare_write(NULL, page, 0, PAGE_SIZE);
ret = page->mapping->a_ops->prepare_write(bitmap->file, page, 0, PAGE_SIZE);
if (!ret)
ret = page->mapping->a_ops->commit_write(NULL, page, 0,
ret = page->mapping->a_ops->commit_write(bitmap->file, page, 0,
PAGE_SIZE);
if (ret) {
unlock_page(page);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册