From: Nick Piggin Date: Tue, 16 Oct 2007 08:25:00 +0000 (-0700) Subject: fs: fix data-loss on error X-Git-Tag: v2.6.24-rc1~1200 X-Git-Url: https://git.openpandora.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=637aff46f94a754207c80c8c64bf1b74f24b967d;p=pandora-kernel.git fs: fix data-loss on error New buffers against uptodate pages are simply be marked uptodate, while the buffer_new bit remains set. This causes error-case code to zero out parts of those buffers because it thinks they contain stale data: wrong, they are actually uptodate so this is a data loss situation. Fix this by actually clearning buffer_new and marking the buffer dirty. It makes sense to always clear buffer_new before setting a buffer uptodate. Signed-off-by: Nick Piggin Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- Reading git-diff-tree failed