Skip to content

Commit

Permalink
NFS: Move the delegation return down into _nfs4_do_setattr()
Browse files Browse the repository at this point in the history
Signed-off-by: Trond Myklebust <[email protected]>
Signed-off-by: Anna Schumaker <[email protected]>
  • Loading branch information
trondmypd authored and amschuma-ntap committed Apr 10, 2018
1 parent 977fcc2 commit 199366f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 0 additions & 5 deletions fs/nfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -613,11 +613,6 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr)
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);
if (error == 0)
error = nfs_refresh_inode(inode, fattr);
Expand Down
4 changes: 4 additions & 0 deletions fs/nfs/nfs4proc.c
Original file line number Diff line number Diff line change
Expand Up @@ -3875,6 +3875,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr,
if (IS_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);
if (status == 0) {
nfs_setattr_update_inode(inode, sattr, fattr);
Expand Down

0 comments on commit 199366f

Please sign in to comment.