aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-02-28 06:33:54 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 10:57:36 -0400
commit29236f4e18dde0c772968b6ce965d0365fe3fe4e (patch)
treeabbfd30756c96fbd3a318986b91738120ed058f8 /fs/9p/vfs_inode.c
parentf735195d51e10b2550097f7b0ac12219060e962b (diff)
fs/9p: set the cached file_operations struct during inode init
With the old code we were not setting the file->f_op with cached file operations during creat. (format correction by jvrao@linux.vnet.ibm.com) Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com> Signed-off-by: Venkateswararao Jujjuri <jvrao@linux.vnet.ibm.com> Signed-off-by: Eric Van Hensbergen <ericvh@gmail.com>
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r--fs/9p/vfs_inode.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index b76a40bdf4c..83af2b7e65d 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -292,10 +292,17 @@ struct inode *v9fs_get_inode(struct super_block *sb, int mode)
292 case S_IFREG: 292 case S_IFREG:
293 if (v9fs_proto_dotl(v9ses)) { 293 if (v9fs_proto_dotl(v9ses)) {
294 inode->i_op = &v9fs_file_inode_operations_dotl; 294 inode->i_op = &v9fs_file_inode_operations_dotl;
295 inode->i_fop = &v9fs_file_operations_dotl; 295 if (v9ses->cache)
296 inode->i_fop =
297 &v9fs_cached_file_operations_dotl;
298 else
299 inode->i_fop = &v9fs_file_operations_dotl;
296 } else { 300 } else {
297 inode->i_op = &v9fs_file_inode_operations; 301 inode->i_op = &v9fs_file_inode_operations;
298 inode->i_fop = &v9fs_file_operations; 302 if (v9ses->cache)
303 inode->i_fop = &v9fs_cached_file_operations;
304 else
305 inode->i_fop = &v9fs_file_operations;
299 } 306 }
300 307
301 break; 308 break;