提交 199366f0 编写于 作者: T Trond Myklebust 提交者: Anna Schumaker

NFS: Move the delegation return down into _nfs4_do_setattr()

Signed-off-by: NTrond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: NAnna Schumaker <Anna.Schumaker@Netapp.com>
上级 977fcc2b
...@@ -613,11 +613,6 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr) ...@@ -613,11 +613,6 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
goto out; goto out;
} }
/*
* Return any delegations if we're going to change ACLs
*/
if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0)
NFS_PROTO(inode)->return_delegation(inode);
error = NFS_PROTO(inode)->setattr(dentry, fattr, attr); error = NFS_PROTO(inode)->setattr(dentry, fattr, attr);
if (error == 0) if (error == 0)
error = nfs_refresh_inode(inode, fattr); error = nfs_refresh_inode(inode, fattr);
......
...@@ -3875,6 +3875,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, ...@@ -3875,6 +3875,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
if (IS_ERR(label)) if (IS_ERR(label))
return PTR_ERR(label); return PTR_ERR(label);
/* Return any delegations if we're going to change ACLs */
if ((sattr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0)
nfs4_inode_return_delegation(inode);
status = nfs4_do_setattr(inode, cred, fattr, sattr, ctx, NULL, label); status = nfs4_do_setattr(inode, cred, fattr, sattr, ctx, NULL, label);
if (status == 0) { if (status == 0) {
nfs_setattr_update_inode(inode, sattr, fattr); nfs_setattr_update_inode(inode, sattr, fattr);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册