diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2018-03-20 16:43:18 -0400 |
---|---|---|
committer | Anna Schumaker <Anna.Schumaker@Netapp.com> | 2018-04-10 16:06:22 -0400 |
commit | 199366f0173f9e01efc23ecd7d88b82ad34f42fb (patch) | |
tree | 3061a0b88f4ab26b56e1771512b9e460b237a6fe | |
parent | 977fcc2b0b41c1fc82e8349995695e207ccb6684 (diff) |
NFS: Move the delegation return down into _nfs4_do_setattr()
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Anna Schumaker <Anna.Schumaker@Netapp.com>
-rw-r--r-- | fs/nfs/inode.c | 5 | ||||
-rw-r--r-- | fs/nfs/nfs4proc.c | 4 |
2 files changed, 4 insertions, 5 deletions
diff --git a/fs/nfs/inode.c b/fs/nfs/inode.c index 7d893543cf3b..9da00b2e26a1 100644 --- a/fs/nfs/inode.c +++ b/fs/nfs/inode.c | |||
@@ -613,11 +613,6 @@ nfs_setattr(struct dentry *dentry, struct iattr *attr) | |||
613 | goto out; | 613 | goto out; |
614 | } | 614 | } |
615 | 615 | ||
616 | /* | ||
617 | * Return any delegations if we're going to change ACLs | ||
618 | */ | ||
619 | if ((attr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) | ||
620 | NFS_PROTO(inode)->return_delegation(inode); | ||
621 | error = NFS_PROTO(inode)->setattr(dentry, fattr, attr); | 616 | error = NFS_PROTO(inode)->setattr(dentry, fattr, attr); |
622 | if (error == 0) | 617 | if (error == 0) |
623 | error = nfs_refresh_inode(inode, fattr); | 618 | error = nfs_refresh_inode(inode, fattr); |
diff --git a/fs/nfs/nfs4proc.c b/fs/nfs/nfs4proc.c index 21daeac114fe..173089f5bf7e 100644 --- a/fs/nfs/nfs4proc.c +++ b/fs/nfs/nfs4proc.c | |||
@@ -3875,6 +3875,10 @@ nfs4_proc_setattr(struct dentry *dentry, struct nfs_fattr *fattr, | |||
3875 | if (IS_ERR(label)) | 3875 | if (IS_ERR(label)) |
3876 | return PTR_ERR(label); | 3876 | return PTR_ERR(label); |
3877 | 3877 | ||
3878 | /* Return any delegations if we're going to change ACLs */ | ||
3879 | if ((sattr->ia_valid & (ATTR_MODE|ATTR_UID|ATTR_GID)) != 0) | ||
3880 | nfs4_inode_return_delegation(inode); | ||
3881 | |||
3878 | status = nfs4_do_setattr(inode, cred, fattr, sattr, ctx, NULL, label); | 3882 | status = nfs4_do_setattr(inode, cred, fattr, sattr, ctx, NULL, label); |
3879 | if (status == 0) { | 3883 | if (status == 0) { |
3880 | nfs_setattr_update_inode(inode, sattr, fattr); | 3884 | nfs_setattr_update_inode(inode, sattr, fattr); |