linux-fsdevel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/6] fs/9p: Properly update inode attributes on link
@ 2011-03-01  8:51 Aneesh Kumar K.V
  2011-03-01  8:51 ` [PATCH 2/6] fs/9p: call vmtruncate before setattr 9p opeation Aneesh Kumar K.V
                   ` (4 more replies)
  0 siblings, 5 replies; 10+ messages in thread
From: Aneesh Kumar K.V @ 2011-03-01  8:51 UTC (permalink / raw)
  To: v9fs-developer; +Cc: linux-fsdevel, linux-kernel, Aneesh Kumar K.V

With caching enabled, we need to make sure we don't
update inode->i_size via stat2inode because we could
have dirty data which is not yet written to the server

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@linux.vnet.ibm.com>
---
 fs/9p/vfs_inode.c      |    4 +++-
 fs/9p/vfs_inode_dotl.c |   10 +---------
 2 files changed, 4 insertions(+), 10 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index e5cd2c4..64f2e4e 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -1295,8 +1295,10 @@ v9fs_vfs_link(struct dentry *old_dentry, struct inode *dir,
 	sprintf(name, "%d\n", oldfid->fid);
 	retval = v9fs_vfs_mkspecial(dir, dentry, P9_DMLINK, name);
 	__putname(name);
-	if (!retval)
+	if (!retval) {
+		v9fs_refresh_inode(oldfid, old_dentry->d_inode);
 		v9fs_invalidate_inode_attr(dir);
+	}
 clunk_fid:
 	p9_client_clunk(oldfid);
 	return retval;
diff --git a/fs/9p/vfs_inode_dotl.c b/fs/9p/vfs_inode_dotl.c
index 5d66a21..2826026 100644
--- a/fs/9p/vfs_inode_dotl.c
+++ b/fs/9p/vfs_inode_dotl.c
@@ -674,19 +674,11 @@ v9fs_vfs_link_dotl(struct dentry *old_dentry, struct inode *dir,
 	if (v9ses->cache == CACHE_LOOSE || v9ses->cache == CACHE_FSCACHE) {
 		/* Get the latest stat info from server. */
 		struct p9_fid *fid;
-		struct p9_stat_dotl *st;
-
 		fid = v9fs_fid_lookup(old_dentry);
 		if (IS_ERR(fid))
 			return PTR_ERR(fid);
 
-		st = p9_client_getattr_dotl(fid, P9_STATS_BASIC);
-		if (IS_ERR(st))
-			return PTR_ERR(st);
-
-		v9fs_stat2inode_dotl(st, old_dentry->d_inode);
-
-		kfree(st);
+		v9fs_refresh_inode_dotl(fid, old_dentry->d_inode);
 	}
 	ihold(old_dentry->d_inode);
 	d_instantiate(dentry, old_dentry->d_inode);
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2011-03-19 20:17 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-03-01  8:51 [PATCH 1/6] fs/9p: Properly update inode attributes on link Aneesh Kumar K.V
2011-03-01  8:51 ` [PATCH 2/6] fs/9p: call vmtruncate before setattr 9p opeation Aneesh Kumar K.V
2011-03-01 12:10   ` Christoph Hellwig
2011-03-01 13:44     ` Aneesh Kumar K. V
2011-03-01 15:07     ` Aneesh Kumar K. V
2011-03-01  8:51 ` [PATCH 3/6] fs/9p: Writeback dirty data before setattr Aneesh Kumar K.V
2011-03-01  8:51 ` [PATCH 4/6] fs/9p: Make the writeback_fid owned by root Aneesh Kumar K.V
2011-03-01  8:51 ` [PATCH 5/6] net/9p: Convert the in the 9p rpc call path to GFP_NOFS Aneesh Kumar K.V
2011-03-01  8:51 ` [PATCH 6/6] net/9p: Fix compile warning Aneesh Kumar K.V
2011-03-19 20:12   ` Geert Uytterhoeven

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).