aboutsummaryrefslogtreecommitdiff
path: root/fs/9p/vfs_file.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@hera.kernel.org>2006-01-18 17:43:02 -0800
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 19:20:22 -0800
commit147b31cf09ee493aa71c87c0dd2eef74b6b2aeba (patch)
tree7a16e9b3855588a24568905bb72841acdc6ec3a8 /fs/9p/vfs_file.c
parenta374a48ffbd7d1ffd40d1d30d2751df159a1aca7 (diff)
[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>
Diffstat (limited to 'fs/9p/vfs_file.c')
-rw-r--r--fs/9p/vfs_file.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 6852f0eb96e..c7e14d91721 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -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,
};