[PATCH 12/14] fs/9p: mark inode attribute invalid on rename and unlink

From: Aneesh Kumar K.V
Date: Thu Feb 17 2011 - 13:03:33 EST


Both rename and unlink result in update of inode attribute.
So mark the cached copy invalid

Signed-off-by: Aneesh Kumar K.V <aneesh.kumar@xxxxxxxxxxxxxxxxxx>
---
fs/9p/vfs_inode.c | 3 +++
1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/fs/9p/vfs_inode.c b/fs/9p/vfs_inode.c
index 27045d9..eaa089c 100644
--- a/fs/9p/vfs_inode.c
+++ b/fs/9p/vfs_inode.c
@@ -520,7 +520,9 @@ static int v9fs_remove(struct inode *dir, struct dentry *file, int rmdir)
drop_nlink(dir);
} else
drop_nlink(file_inode);
+
v9fs_invalidate_inode_attr(dir);
+ v9fs_invalidate_inode_attr(file_inode);
}
return retval;
}
@@ -901,6 +903,7 @@ clunk_newdir:
}
v9fs_invalidate_inode_attr(old_dir);
v9fs_invalidate_inode_attr(new_dir);
+ v9fs_invalidate_inode_attr(old_inode);
/* successful rename */
d_move(old_dentry, new_dentry);
}
--
1.7.1

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/