Commit 5edfe56c authored by David S. Miller's avatar David S. Miller Committed by Linus Torvalds

[PATCH] sparc64 2.5.x file corruptions found

Andrew removed a flush_dcache_page in his kmap_atomic generic_file_*
changes.

Doing that sort of corrupts data on some platforms.
parent 7156d71a
...@@ -2161,6 +2161,7 @@ generic_file_write_nolock(struct file *file, const struct iovec *iov, ...@@ -2161,6 +2161,7 @@ generic_file_write_nolock(struct file *file, const struct iovec *iov,
break; break;
} }
page_fault = filemap_copy_from_user(page, offset, buf, bytes); page_fault = filemap_copy_from_user(page, offset, buf, bytes);
flush_dcache_page(page);
status = a_ops->commit_write(file, page, offset, offset+bytes); status = a_ops->commit_write(file, page, offset, offset+bytes);
if (unlikely(page_fault)) { if (unlikely(page_fault)) {
status = -EFAULT; status = -EFAULT;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment