diff options
author | Christoph Hellwig <hch@lst.de> | 2020-02-26 17:30:29 -0800 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2020-03-02 20:55:52 -0800 |
commit | 0eb81a5f5c34429f0d86329260b3b07e2d4c5e22 (patch) | |
tree | 28273c8a0ca8b0e4f4bd7b3917fa5ea964b24183 /fs/xfs/xfs_ioctl.c | |
parent | 5e81357435cc0ef6b2ba4a9dcfca52be4e471cf5 (diff) | |
download | linux-0eb81a5f5c34429f0d86329260b3b07e2d4c5e22.tar.gz linux-0eb81a5f5c34429f0d86329260b3b07e2d4c5e22.tar.bz2 linux-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.c | 4 |
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; |