rename, unlink and setattr can result in update of inode attribute.
So mark the cached copy 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>
drop_nlink(dir);
} else
drop_nlink(file_inode);
+ v9fs_invalidate_inode_attr(file_inode);
}
return retval;
}
inc_nlink(new_dir);
drop_nlink(old_dir);
}
+ v9fs_invalidate_inode_attr(old_inode);
+
/* successful rename */
d_move(old_dentry, new_dentry);
}
if (retval < 0)
return retval;
+ v9fs_invalidate_inode_attr(dentry->d_inode);
if ((iattr->ia_valid & ATTR_SIZE) &&
iattr->ia_size != i_size_read(dentry->d_inode)) {
retval = vmtruncate(dentry->d_inode, iattr->ia_size);
if (retval < 0)
return retval;
+ v9fs_invalidate_inode_attr(dentry->d_inode);
if ((iattr->ia_valid & ATTR_SIZE) &&
iattr->ia_size != i_size_read(dentry->d_inode)) {
retval = vmtruncate(dentry->d_inode, iattr->ia_size);