From: Nick Piggin Date: Tue, 6 Jan 2009 22:39:12 +0000 (-0800) Subject: mm: do_sync_mapping_range integrity fix X-Git-Tag: v2.6.29-rc1~473 X-Git-Url: http://pilppa.com/gitweb/?a=commitdiff_plain;h=ee53a891f47444c53318b98dac947ede963db400;p=linux-2.6-omap-h63xx.git mm: do_sync_mapping_range integrity fix Chris Mason notices do_sync_mapping_range didn't actually ask for data integrity writeout. Unfortunately, it is advertised as being usable for data integrity operations. This is a data integrity bug. Signed-off-by: Nick Piggin Cc: Chris Mason Cc: Dave Chinner Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/fs/sync.c b/fs/sync.c index 0921d6d4b5e..ac02b56548b 100644 --- a/fs/sync.c +++ b/fs/sync.c @@ -295,7 +295,7 @@ int do_sync_mapping_range(struct address_space *mapping, loff_t offset, if (flags & SYNC_FILE_RANGE_WRITE) { ret = __filemap_fdatawrite_range(mapping, offset, endbyte, - WB_SYNC_NONE); + WB_SYNC_ALL); if (ret < 0) goto out; }