Skip to content

Commit

Permalink
[PATCH] md: don't pass a NULL file* into ->prepare_write()
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Neil Brown authored and Linus Torvalds committed Nov 18, 2005
1 parent c4b32b8 commit 34ef75f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
Expand Down

0 comments on commit 34ef75f

Please sign in to comment.