提交 8cef9c67 编写于 作者: S Stephen Rothwell 提交者: Al Viro

v9fs: fixup for inode_setattr being removed

Signed-off-by: NStephen Rothwell <sfr@canb.auug.org.au>
Signed-off-by: NAl Viro <viro@zeniv.linux.org.uk>
上级 b34d8915
......@@ -1263,10 +1263,19 @@ static int v9fs_vfs_setattr_dotl(struct dentry *dentry, struct iattr *iattr)
return PTR_ERR(fid);
retval = p9_client_setattr(fid, &p9attr);
if (retval >= 0)
retval = inode_setattr(dentry->d_inode, iattr);
if (retval < 0)
return retval;
return retval;
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)
return retval;
}
setattr_copy(dentry->d_inode, iattr);
mark_inode_dirty(dentry->d_inode);
return 0;
}
/**
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册