aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2009-01-06 14:39:12 -0800
committerGreg Kroah-Hartman <gregkh@suse.de>2009-01-24 16:36:28 -0800
commitebf8d00d3ffadbba82ea19f9c6e273c8fb09c8a8 (patch)
treed514518d860cfca4fb3589aac85348b4a6e173ee
parent7cef443310ed7e6317b19b94628c968aa210ce17 (diff)
downloadlinux-linaro-stable-ebf8d00d3ffadbba82ea19f9c6e273c8fb09c8a8.tar.gz
mm: do_sync_mapping_range integrity fix
commit ee53a891f47444c53318b98dac947ede963db400 upstream. 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 <npiggin@suse.de> Cc: Chris Mason <chris.mason@oracle.com> Cc: Dave Chinner <david@fromorbit.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
-rw-r--r--fs/sync.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/sync.c b/fs/sync.c
index 6cc8cb4ac022..9e5f60dbd54b 100644
--- a/fs/sync.c
+++ b/fs/sync.c
@@ -287,7 +287,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;
}