aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p
diff options
context:
space:
mode:
Diffstat (limited to 'fs/9p')
-rw-r--r--fs/9p/vfs_file.c4
-rw-r--r--fs/9p/vfs_inode.c23
-rw-r--r--fs/9p/vfs_super.c4
3 files changed, 14 insertions, 17 deletions
diff --git a/fs/9p/vfs_file.c b/fs/9p/vfs_file.c
index 9f17b0cacdd0..6c78343cf690 100644
--- a/fs/9p/vfs_file.c
+++ b/fs/9p/vfs_file.c
@@ -110,7 +110,7 @@ static int v9fs_file_lock(struct file *filp, int cmd, struct file_lock *fl)
110 110
111 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) { 111 if ((IS_SETLK(cmd) || IS_SETLKW(cmd)) && fl->fl_type != F_UNLCK) {
112 filemap_write_and_wait(inode->i_mapping); 112 filemap_write_and_wait(inode->i_mapping);
113 invalidate_inode_pages(&inode->i_data); 113 invalidate_mapping_pages(&inode->i_data, 0, -1);
114 } 114 }
115 115
116 return res; 116 return res;
@@ -234,7 +234,7 @@ v9fs_file_write(struct file *filp, const char __user * data,
234 total += result; 234 total += result;
235 } while (count); 235 } while (count);
236 236
237 invalidate_inode_pages2(inode->i_mapping); 237 invalidate_inode_pages2(inode->i_mapping);
238 return total; 238 return total;
239} 239}
240 240
diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 9109ba1d6969..5cf22134826b 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -41,10 +41,10 @@
41#include "v9fs_vfs.h" 41#include "v9fs_vfs.h"
42#include "fid.h" 42#include "fid.h"
43 43
44static struct inode_operations v9fs_dir_inode_operations; 44static const struct inode_operations v9fs_dir_inode_operations;
45static struct inode_operations v9fs_dir_inode_operations_ext; 45static const struct inode_operations v9fs_dir_inode_operations_ext;
46static struct inode_operations v9fs_file_inode_operations; 46static const struct inode_operations v9fs_file_inode_operations;
47static struct inode_operations v9fs_symlink_inode_operations; 47static const struct inode_operations v9fs_symlink_inode_operations;
48 48
49/** 49/**
50 * unixmode2p9mode - convert unix mode bits to plan 9 50 * unixmode2p9mode - convert unix mode bits to plan 9
@@ -585,17 +585,14 @@ static int v9fs_vfs_mkdir(struct inode *dir, struct dentry *dentry, int mode)
585 if (IS_ERR(inode)) { 585 if (IS_ERR(inode)) {
586 err = PTR_ERR(inode); 586 err = PTR_ERR(inode);
587 inode = NULL; 587 inode = NULL;
588 goto clean_up_fids; 588 v9fs_fid_destroy(vfid);
589 goto error;
589 } 590 }
590 591
591 dentry->d_op = &v9fs_dentry_operations; 592 dentry->d_op = &v9fs_dentry_operations;
592 d_instantiate(dentry, inode); 593 d_instantiate(dentry, inode);
593 return 0; 594 return 0;
594 595
595clean_up_fids:
596 if (vfid)
597 v9fs_fid_destroy(vfid);
598
599clean_up_dfid: 596clean_up_dfid:
600 v9fs_fid_clunk(v9ses, dfid); 597 v9fs_fid_clunk(v9ses, dfid);
601 598
@@ -1306,7 +1303,7 @@ v9fs_vfs_mknod(struct inode *dir, struct dentry *dentry, int mode, dev_t rdev)
1306 return retval; 1303 return retval;
1307} 1304}
1308 1305
1309static struct inode_operations v9fs_dir_inode_operations_ext = { 1306static const struct inode_operations v9fs_dir_inode_operations_ext = {
1310 .create = v9fs_vfs_create, 1307 .create = v9fs_vfs_create,
1311 .lookup = v9fs_vfs_lookup, 1308 .lookup = v9fs_vfs_lookup,
1312 .symlink = v9fs_vfs_symlink, 1309 .symlink = v9fs_vfs_symlink,
@@ -1321,7 +1318,7 @@ static struct inode_operations v9fs_dir_inode_operations_ext = {
1321 .setattr = v9fs_vfs_setattr, 1318 .setattr = v9fs_vfs_setattr,
1322}; 1319};
1323 1320
1324static struct inode_operations v9fs_dir_inode_operations = { 1321static const struct inode_operations v9fs_dir_inode_operations = {
1325 .create = v9fs_vfs_create, 1322 .create = v9fs_vfs_create,
1326 .lookup = v9fs_vfs_lookup, 1323 .lookup = v9fs_vfs_lookup,
1327 .unlink = v9fs_vfs_unlink, 1324 .unlink = v9fs_vfs_unlink,
@@ -1333,12 +1330,12 @@ static struct inode_operations v9fs_dir_inode_operations = {
1333 .setattr = v9fs_vfs_setattr, 1330 .setattr = v9fs_vfs_setattr,
1334}; 1331};
1335 1332
1336static struct inode_operations v9fs_file_inode_operations = { 1333static const struct inode_operations v9fs_file_inode_operations = {
1337 .getattr = v9fs_vfs_getattr, 1334 .getattr = v9fs_vfs_getattr,
1338 .setattr = v9fs_vfs_setattr, 1335 .setattr = v9fs_vfs_setattr,
1339}; 1336};
1340 1337
1341static struct inode_operations v9fs_symlink_inode_operations = { 1338static const struct inode_operations v9fs_symlink_inode_operations = {
1342 .readlink = v9fs_vfs_readlink, 1339 .readlink = v9fs_vfs_readlink,
1343 .follow_link = v9fs_vfs_follow_link, 1340 .follow_link = v9fs_vfs_follow_link,
1344 .put_link = v9fs_vfs_put_link, 1341 .put_link = v9fs_vfs_put_link,
diff --git a/fs/9p/vfs_super.c b/fs/9p/vfs_super.c
index 63320d4e15d2..0ec42f665457 100644
--- a/fs/9p/vfs_super.c
+++ b/fs/9p/vfs_super.c
@@ -45,7 +45,7 @@
45#include "fid.h" 45#include "fid.h"
46 46
47static void v9fs_clear_inode(struct inode *); 47static void v9fs_clear_inode(struct inode *);
48static struct super_operations v9fs_super_ops; 48static const struct super_operations v9fs_super_ops;
49 49
50/** 50/**
51 * v9fs_clear_inode - release an inode 51 * v9fs_clear_inode - release an inode
@@ -263,7 +263,7 @@ v9fs_umount_begin(struct vfsmount *vfsmnt, int flags)
263 v9fs_session_cancel(v9ses); 263 v9fs_session_cancel(v9ses);
264} 264}
265 265
266static struct super_operations v9fs_super_ops = { 266static const struct super_operations v9fs_super_ops = {
267 .statfs = simple_statfs, 267 .statfs = simple_statfs,
268 .clear_inode = v9fs_clear_inode, 268 .clear_inode = v9fs_clear_inode,
269 .show_options = v9fs_show_options, 269 .show_options = v9fs_show_options,