ubifs: wait for page writeback to provide stable pages
authorJan Kara <[email protected]>
Fri, 22 Feb 2013 00:42:59 +0000 (16:42 -0800)
committerLinus Torvalds <[email protected]>
Fri, 22 Feb 2013 01:22:20 +0000 (17:22 -0800)
When stable pages are required, we have to wait if the page is just
going to disk and we want to modify it.  Add proper callback to
ubifs_vm_page_mkwrite().

Signed-off-by: Jan Kara <[email protected]>
Signed-off-by: Darrick J. Wong <[email protected]>
Cc: Artem Bityutskiy <[email protected]>
Cc: Adrian Hunter <[email protected]>
Cc: Andy Lutomirski <[email protected]>
Cc: Joel Becker <[email protected]>
Cc: Mark Fasheh <[email protected]>
Cc: Steven Whitehouse <[email protected]>
Cc: Jens Axboe <[email protected]>
Cc: Eric Van Hensbergen <[email protected]>
Cc: Ron Minnich <[email protected]>
Cc: Latchesar Ionkov <[email protected]>
Signed-off-by: Andrew Morton <[email protected]>
Signed-off-by: Linus Torvalds <[email protected]>
fs/ubifs/file.c

index 5bc77817f382c8d527237f3a91976c4de9bf1873..4f6493c130e023bacc5b561a6b233c2d9e0cbf44 100644 (file)
@@ -1522,6 +1522,7 @@ static int ubifs_vm_page_mkwrite(struct vm_area_struct *vma,
                        ubifs_release_dirty_inode_budget(c, ui);
        }
 
+       wait_for_stable_page(page);
        unlock_page(page);
        return 0;