[PATCH] md: don't pass a NULL file* into ->prepare_write()
authorNeil Brown <neilb@suse.de>
Fri, 18 Nov 2005 09:10:59 +0000 (01:10 -0800)
committerLinus Torvalds <torvalds@g5.osdl.org>
Fri, 18 Nov 2005 15:49:46 +0000 (07:49 -0800)
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>
drivers/md/bitmap.c

index 51315302a85e43ab651a4edaba742784d5e04af2..252d55df964296c97960242a016fc7b8573c4279 100644 (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);