diff options
Diffstat (limited to 'fs/9p/vfs_inode.c')
-rw-r--r-- | fs/9p/vfs_inode.c | 11 |
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; |