[PATCH] v9fs: add readpage support

v9fs mmap support was originally removed from v9fs at Al Viro's request,
but recently there have been requests from folks who want readpage
functionality (primarily to enable execution of files mounted via 9P).
This patch adds readpage support (but not writepage which contained most of
the objectionable code).  It passes fsx-linux (and other regressions) so it
should be relatively safe.

Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
This commit is contained in:
Eric Van Hensbergen
2006-01-18 17:43:02 -08:00
committed by Linus Torvalds
parent a374a48ffb
commit 147b31cf09
5 changed files with 116 additions and 0 deletions

View File

@ -289,6 +289,9 @@ v9fs_file_write(struct file *filp, const char __user * data,
total += result;
} while (count);
if(inode->i_mapping->nrpages)
invalidate_inode_pages2(inode->i_mapping);
return total;
}
@ -299,4 +302,5 @@ struct file_operations v9fs_file_operations = {
.open = v9fs_file_open,
.release = v9fs_dir_release,
.lock = v9fs_file_lock,
.mmap = generic_file_mmap,
};