summaryrefslogtreecommitdiffstats
path: root/ipc
diff options
context:
space:
mode:
authorNick Piggin <npiggin@suse.de>2009-01-06 14:39:06 -0800
committerLinus Torvalds <torvalds@linux-foundation.org>2009-01-06 15:58:59 -0800
commit00266770b8b3a6a77f896ca501a0613739086832 (patch)
treee10b01330e928b6d3eaa1040560fe133ddba6654 /ipc
parentbd19e012f6fd3b7309689165ea865cbb7bb88c1e (diff)
downloadlinux-00266770b8b3a6a77f896ca501a0613739086832.tar.bz2
mm: write_cache_pages writepage error fix
In write_cache_pages, if ret signals a real error, but we still have some pages left in the pagevec, done would be set to 1, but the remaining pages would continue to be processed and ret will be overwritten in the process. It could easily be overwritten with success, and thus success will be returned even if there is an error. Thus the caller is told all writes succeeded, wheras in reality some did not. Fix this by bailing immediately if there is an error, and retaining the first error code. 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>
Diffstat (limited to 'ipc')
0 files changed, 0 insertions, 0 deletions