[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:
parent
c4b32b8b01
commit
34ef75f09f
|
@ -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)
|
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);
|
PAGE_SIZE);
|
||||||
if (ret) {
|
if (ret) {
|
||||||
unlock_page(page);
|
unlock_page(page);
|
||||||
|
|
Loading…
Reference in New Issue