From: NeilBrown Date: Fri, 6 Jan 2006 08:20:45 +0000 (-0800) Subject: [PATCH] md: make sure bitmap updates are visible through filesystem X-Git-Tag: v2.6.16-rc1~936^2~17 X-Git-Url: https://openfabrics.org/gitweb/?a=commitdiff_plain;h=c708443c004f2310abdd7f1c353daa372b37f7a2;p=~shefty%2Frdma-dev.git [PATCH] md: make sure bitmap updates are visible through filesystem 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 Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/drivers/md/bitmap.c b/drivers/md/bitmap.c index ee4a3424a8a..76a189ceb52 100644 --- a/drivers/md/bitmap.c +++ b/drivers/md/bitmap.c @@ -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 {