Commit 8cde9f25 authored by Christoph Hellwig's avatar Christoph Hellwig Committed by Darrick J. Wong
Browse files

xfs: also remove cached ACLs when removing the underlying attr



We should not just invalidate the ACL when setting the underlying
attribute, but also when removing it.  The ioctl interface gets that
right, but the normal xattr inteface skipped the xfs_forget_acl due
to an early return.

Signed-off-by: default avatarChristoph Hellwig <hch@lst.de>
Reviewed-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: default avatarDarrick J. Wong <darrick.wong@oracle.com>
parent 84fd081f
Loading
Loading
Loading
Loading
+4 −3
Original line number Diff line number Diff line
@@ -74,10 +74,11 @@ xfs_xattr_set(const struct xattr_handler *handler, struct dentry *unused,
	if (flags & XATTR_REPLACE)
		xflags |= ATTR_REPLACE;

	if (!value)
		return xfs_attr_remove(ip, (unsigned char *)name, xflags);
	if (value)
		error = xfs_attr_set(ip, (unsigned char *)name,
				(void *)value, size, xflags);
	else
		error = xfs_attr_remove(ip, (unsigned char *)name, xflags);
	if (!error)
		xfs_forget_acl(inode, name, xflags);