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

Some filesystems go oops.

Signed-off-by: Neil Brown <neilb@suse.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Neil Brown 2005-11-18 01:10:59 -08:00 committed by Linus Torvalds
parent c4b32b8b01
commit 34ef75f09f

View File

@ -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);