@@ -900,10 +900,19 @@ static int v9fs_vfs_setattr(struct dentry *dentry, struct iattr *iattr)
struct v9fs_session_info *v9ses;
struct p9_fid *fid;
struct p9_wstat wstat;
+ int access;
P9_DPRINTK(P9_DEBUG_VFS, "\n");
retval = -EPERM;
v9ses = v9fs_inode2v9ses(dentry->d_inode);
+ access = v9ses->flags & V9FS_ACCESS_MASK;
+
+ if ((access == V9FS_ACCESS_CLIENT)) {
+ retval = inode_change_ok(dentry->d_inode, iattr);
+ if (retval)
+ return retval;
+ }
+
fid = v9fs_fid_lookup(dentry);
if(IS_ERR(fid))
return PTR_ERR(fid);