aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_ioctl.c
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2020-02-26 17:30:29 -0800
committerDarrick J. Wong <darrick.wong@oracle.com>2020-03-02 20:55:52 -0800
commit0eb81a5f5c34429f0d86329260b3b07e2d4c5e22 (patch)
tree28273c8a0ca8b0e4f4bd7b3917fa5ea964b24183 /fs/xfs/xfs_ioctl.c
parentxfs: remove the ATTR_INCOMPLETE flag (diff)
downloadlinux-dev-0eb81a5f5c34429f0d86329260b3b07e2d4c5e22.tar.xz
linux-dev-0eb81a5f5c34429f0d86329260b3b07e2d4c5e22.zip
xfs: merge xfs_attr_remove into xfs_attr_set
The Linux xattr and acl APIs use a single call for set and remove. Modify the high-level XFS API to match that and let xfs_attr_set handle removing attributes as well. With a little bit of reordering this removes a lot of code. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Chandan Rajendra <chandanrlinux@gmail.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_ioctl.c')
-rw-r--r--fs/xfs/xfs_ioctl.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/fs/xfs/xfs_ioctl.c b/fs/xfs/xfs_ioctl.c
index 3e457e988c46..6108955b199d 100644
--- a/fs/xfs/xfs_ioctl.c
+++ b/fs/xfs/xfs_ioctl.c
@@ -417,12 +417,10 @@ xfs_attrmulti_attr_remove(
uint32_t flags)
{
int error;
- size_t namelen;
if (IS_IMMUTABLE(inode) || IS_APPEND(inode))
return -EPERM;
- namelen = strlen(name);
- error = xfs_attr_remove(XFS_I(inode), name, namelen, flags);
+ error = xfs_attr_set(XFS_I(inode), name, strlen(name), NULL, 0, flags);
if (!error)
xfs_forget_acl(inode, name, flags);
return error;