@@ -958,9 +958,10 @@ v9fs_vfs_getattr(struct vfsmount *mnt, struct dentry *dentry,
static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr)
{
int retval;
- struct v9fs_session_info *v9ses;
struct p9_fid *fid;
struct p9_wstat wstat;
+ struct v9fs_session_info *v9ses;
+
P9_DPRINTK(P9_DEBUG_VFS, "\n");
retval = -EPERM;
@@ -993,6 +994,12 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr)
retval = p9_client_wstat(fid, &wstat);
if (retval < 0)
return retval;
+ /*
+ * Changing some of the attribute can result in
+ * implicit update of other attributes. So mark
+ * all of them invalid
+ */
+ v9fs_invalidate_inode_attr(dentry->d_inode);
if ((iattr->ia_valid & ATTR_SIZE) &&
iattr->ia_size != i_size_read(dentry->d_inode)) {
@@ -436,9 +436,9 @@ v9fs_vfs_getattr_dotl(struct vfsmount *mnt, struct dentry *dentry,
int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
{
int retval;
- struct v9fs_session_info *v9ses;
struct p9_fid *fid;
struct p9_iattr_dotl p9attr;
+ struct v9fs_session_info *v9ses;
P9_DPRINTK(P9_DEBUG_VFS, "\n");
@@ -465,6 +465,12 @@ int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
retval = p9_client_setattr(fid, &p9attr);
if (retval < 0)
return retval;
+ /*
+ * Changing some of the attribute can result in
+ * implicit update of other attributes. So mark
+ * all of them invalid
+ */
+ v9fs_invalidate_inode_attr(dentry->d_inode);
if ((iattr->ia_valid & ATTR_SIZE) &&
iattr->ia_size != i_size_read(dentry->d_inode)) {