Skip to content

Commit

Permalink
mm: do_sync_mapping_range integrity fix
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nick Piggin authored and torvalds committed Jan 6, 2009
1 parent 82fd1a9 commit ee53a89
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fs/sync.c
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit ee53a89

Please sign in to comment.