diff options
| author | Andrew Morton <akpm@digeo.com> | 2002-10-28 16:22:07 -0800 |
|---|---|---|
| committer | Jens Axboe <axboe@suse.de> | 2002-10-28 16:22:07 -0800 |
| commit | 303c9cf648d3e5f648afe89d624cc3e3c8d5ce71 (patch) | |
| tree | 2f83577b40e2a0abd54853934481b0f0a19c2fec /include/linux | |
| parent | 3ee477f0d419d10cdd72ac9b7d7e9e7cc95e99f0 (diff) | |
[PATCH] libfs a_ops correctnes
simple_prepare_write() currently memsets the entire page. It only
needs to clear the parts which are outside the to-be-written region.
This change makes no difference to performance - that memset was just a
cache preload for the copy_from_user() in generic_file_write(). But
it's more correct.
Also, mark the page dirty in simple_commit_write(), not in
simple_prepare_write(). Because the page's contents are changed after
prepare_write(). This doesn't matter in practice, but it is setting a
bad example.
Also, add a flush_dcache_page() to simple_prepare_write(). Again, not
really needed because the page cannot be mapped into pagetables if it
is not uptodate. But it is example code and should not be missing such
things.
Diffstat (limited to 'include/linux')
0 files changed, 0 insertions, 0 deletions
