aboutsummaryrefslogtreecommitdiffstats
path: root/fs/9p/vfs_inode_dotl.c
diff options
context:
space:
mode:
authorAneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>2011-02-28 06:34:08 -0500
committerEric Van Hensbergen <ericvh@gmail.com>2011-03-15 10:57:41 -0400
commitd28c61f0e08aab9e3a2d3430e75f97937c5fe5fd (patch)
tree2a75e52772d832e4b9203fdc7500ecf8a05c5b43 /fs/9p/vfs_inode_dotl.c
parent823fcfd42297acaf28892b3d2aabef2a121449c2 (diff)
fs/9p: Mark directory inode invalid for many directory inode operations
One successfull directory operation we would have changed directory inode attribute. So mark them invalid 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_dotl.c')
-rw-r--r--fs/9p/vfs_inode_dotl.c23
1 files changed, 14 insertions, 9 deletions
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 8d5f7e328631..4d4c70e07081 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -220,6 +220,7 @@ v9fs_vfs_create_dotl(struct inode *dir, struct dentry *dentry, int omode,
220 err); 220 err);
221 goto error; 221 goto error;
222 } 222 }
223 v9fs_invalidate_inode_attr(dir);
223 224
224 /* instantiate inode and assign the unopened fid to the dentry */ 225 /* instantiate inode and assign the unopened fid to the dentry */
225 fid = p9_client_walk(dfid, 1, &name, 1); 226 fid = p9_client_walk(dfid, 1, &name, 1);
@@ -372,6 +373,7 @@ static int v9fs_vfs_mkdir_dotl(struct inode *dir,
372 /* Now set the ACL based on the default value */ 373 /* Now set the ACL based on the default value */
373 v9fs_set_create_acl(dentry, dacl, pacl); 374 v9fs_set_create_acl(dentry, dacl, pacl);
374 inc_nlink(dir); 375 inc_nlink(dir);
376 v9fs_invalidate_inode_attr(dir);
375error: 377error:
376 if (fid) 378 if (fid)
377 p9_client_clunk(fid); 379 p9_client_clunk(fid);
@@ -551,14 +553,14 @@ static int
551v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry, 553v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,
552 const char *symname) 554 const char *symname)
553{ 555{
554 struct v9fs_session_info *v9ses;
555 struct p9_fid *dfid;
556 struct p9_fid *fid = NULL;
557 struct inode *inode;
558 struct p9_qid qid;
559 char *name;
560 int err; 556 int err;
561 gid_t gid; 557 gid_t gid;
558 char *name;
559 struct p9_qid qid;
560 struct inode *inode;
561 struct p9_fid *dfid;
562 struct p9_fid *fid = NULL;
563 struct v9fs_session_info *v9ses;
562 564
563 name = (char *) dentry->d_name.name; 565 name = (char *) dentry->d_name.name;
564 P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_symlink_dotl : %lu,%s,%s\n", 566 P9_DPRINTK(P9_DEBUG_VFS, "v9fs_vfs_symlink_dotl : %lu,%s,%s\n",
@@ -582,6 +584,7 @@ v9fs_vfs_symlink_dotl(struct inode *dir, struct dentry *dentry,
582 goto error; 584 goto error;
583 } 585 }
584 586
587 v9fs_invalidate_inode_attr(dir);
585 if (v9ses->cache) { 588 if (v9ses->cache) {
586 /* Now walk from the parent so we can get an unopened fid. */ 589 /* Now walk from the parent so we can get an unopened fid. */
587 fid = p9_client_walk(dfid, 1, &name, 1); 590 fid = p9_client_walk(dfid, 1, &name, 1);
@@ -636,10 +639,10 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
636 struct dentry *dentry) 639 struct dentry *dentry)
637{ 640{
638 int err; 641 int err;
639 struct p9_fid *dfid, *oldfid;
640 char *name; 642 char *name;
641 struct v9fs_session_info *v9ses;
642 struct dentry *dir_dentry; 643 struct dentry *dir_dentry;
644 struct p9_fid *dfid, *oldfid;
645 struct v9fs_session_info *v9ses;
643 646
644 P9_DPRINTK(P9_DEBUG_VFS, "dir ino: %lu, old_name: %s, new_name: %s\n", 647 P9_DPRINTK(P9_DEBUG_VFS, "dir ino: %lu, old_name: %s, new_name: %s\n",
645 dir->i_ino, old_dentry->d_name.name, 648 dir->i_ino, old_dentry->d_name.name,
@@ -664,6 +667,7 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
664 return err; 667 return err;
665 } 668 }
666 669
670 v9fs_invalidate_inode_attr(dir);
667 if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { 671 if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
668 /* Get the latest stat info from server. */ 672 /* Get the latest stat info from server. */
669 struct p9_fid *fid; 673 struct p9_fid *fid;
@@ -700,12 +704,12 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode,
700 dev_t rdev) 704 dev_t rdev)
701{ 705{
702 int err; 706 int err;
707 gid_t gid;
703 char *name; 708 char *name;
704 mode_t mode; 709 mode_t mode;
705 struct v9fs_session_info *v9ses; 710 struct v9fs_session_info *v9ses;
706 struct p9_fid *fid = NULL, *dfid = NULL; 711 struct p9_fid *fid = NULL, *dfid = NULL;
707 struct inode *inode; 712 struct inode *inode;
708 gid_t gid;
709 struct p9_qid qid; 713 struct p9_qid qid;
710 struct dentry *dir_dentry; 714 struct dentry *dir_dentry;
711 struct posix_acl *dacl = NULL, *pacl = NULL; 715 struct posix_acl *dacl = NULL, *pacl = NULL;
@@ -742,6 +746,7 @@ v9fs_vfs_mknod_dotl(struct inode *dir, struct dentry *dentry, int omode,
742 if (err < 0) 746 if (err < 0)
743 goto error; 747 goto error;
744 748
749 v9fs_invalidate_inode_attr(dir);
745 /* instantiate inode and assign the unopened fid to the dentry */ 750 /* instantiate inode and assign the unopened fid to the dentry */
746 if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) { 751 if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
747 fid = p9_client_walk(dfid, 1, &name, 1); 752 fid = p9_client_walk(dfid, 1, &name, 1);