Skip to content

Commit

Permalink
[PATCH] md: make sure bitmap updates are visible through filesystem
Browse files Browse the repository at this point in the history
When we update a page_cache page in the kernel, we need to flush_dache_page or
userspace might not see the change.

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
NeilBrown authored and Linus Torvalds committed Jan 6, 2006
1 parent 07dbd37 commit c708443
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions drivers/md/bitmap.c
Original file line number Diff line number Diff line change
Expand Up @@ -315,6 +315,8 @@ static int write_page(struct bitmap *bitmap, struct page *page, int wait)
if (bitmap->file == NULL)
return write_sb_page(bitmap->mddev, bitmap->offset, page, wait);

flush_dcache_page(page); /* make sure visible to anyone reading the file */

if (wait)
lock_page(page);
else {
Expand Down

0 comments on commit c708443

Please sign in to comment.