aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_iops.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-12-10 20:00:39 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-12-12 10:49:38 -0800
commit5d24ec4c7d3c4520b1baec4443ad47b5ae796570 (patch)
tree51e968af6e3e47625947b9f53007dc356abaeae5 /fs/xfs/xfs_iops.c
parentxfs: remove xfs_vn_setattr_nonsize (diff)
downloadlinux-dev-5d24ec4c7d3c4520b1baec4443ad47b5ae796570.tar.xz
linux-dev-5d24ec4c7d3c4520b1baec4443ad47b5ae796570.zip
xfs: open code updating i_mode in xfs_set_acl
Rather than going through the big and hairy xfs_setattr_nonsize function, just open code a transactional i_mode and i_ctime update. This allows to mark xfs_setattr_nonsize and remove the flags argument to it. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Gao Xiang <hsiangkao@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_iops.c')
-rw-r--r--fs/xfs/xfs_iops.c11
1 files changed, 5 insertions, 6 deletions
diff --git a/fs/xfs/xfs_iops.c b/fs/xfs/xfs_iops.c
index a0644da67321..67c8dc9de8aa 100644
--- a/fs/xfs/xfs_iops.c
+++ b/fs/xfs/xfs_iops.c
@@ -646,11 +646,10 @@ xfs_vn_change_ok(
* Caution: The caller of this function is responsible for calling
* setattr_prepare() or otherwise verifying the change is fine.
*/
-int
+static int
xfs_setattr_nonsize(
struct xfs_inode *ip,
- struct iattr *iattr,
- int flags)
+ struct iattr *iattr)
{
xfs_mount_t *mp = ip->i_mount;
struct inode *inode = VFS_I(ip);
@@ -807,7 +806,7 @@ xfs_setattr_nonsize(
* to attr_set. No previous user of the generic
* Posix ACL code seems to care about this issue either.
*/
- if ((mask & ATTR_MODE) && !(flags & XFS_ATTR_NOACL)) {
+ if (mask & ATTR_MODE) {
error = posix_acl_chmod(inode, inode->i_mode);
if (error)
return error;
@@ -863,7 +862,7 @@ xfs_setattr_size(
* Use the regular setattr path to update the timestamps.
*/
iattr->ia_valid &= ~ATTR_SIZE;
- return xfs_setattr_nonsize(ip, iattr, 0);
+ return xfs_setattr_nonsize(ip, iattr);
}
/*
@@ -1074,7 +1073,7 @@ xfs_vn_setattr(
error = xfs_vn_change_ok(dentry, iattr);
if (!error)
- error = xfs_setattr_nonsize(ip, iattr, 0);
+ error = xfs_setattr_nonsize(ip, iattr);
}
return error;