aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_file.c
diff options
context:
space:
mode:
authorEric Van Hensbergen <ericvh@hera.kernel.org>2006-01-18 20:43:02 -0500
committerLinus Torvalds <torvalds@g5.osdl.org>2006-01-18 22:20:22 -0500
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 6852f0eb96ed..c7e14d917215 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,
289 total += result; 289 total += result;
290 } while (count); 290 } while (count);
291 291
292 if(inode->i_mapping->nrpages)
293 invalidate_inode_pages2(inode->i_mapping);
294
292 return total; 295 return total;
293} 296}
294 297
@@ -299,4 +302,5 @@ struct file_operations v9fs_file_operations = {
299 .open = v9fs_file_open, 302 .open = v9fs_file_open,
300 .release = v9fs_dir_release, 303 .release = v9fs_dir_release,
301 .lock = v9fs_file_lock, 304 .lock = v9fs_file_lock,
305 .mmap = generic_file_mmap,
302}; 306};