[PATCH] ENOSPC correctness
A forward-port. This is the code which prevents ENOSPC errors from exposing stale data within filesystems. - in generic_file_write(), if prepare_write() fails, truncate the file to drop any part-added blocks. - in __block_write_full_page(), if we hit an error, push whatever buffers we _have_ mapped into the file out to disk. - in __block_prepare_write(), if we hit an error, zero out any blocks which we did manage to map into the file. This is because the caller won't be doing any writing to those blocks due to the error.
Showing
Please register or sign in to comment