xfs: return -E2BIG if hit the maximum size limits of ACLs
authorJie Liu <jeff.liu@oracle.com>
Fri, 7 Feb 2014 04:26:11 +0000 (15:26 +1100)
committerDave Chinner <david@fromorbit.com>
Fri, 7 Feb 2014 04:26:11 +0000 (15:26 +1100)
We should return -E2BIG rather than -EINVAL if hit the maximum size
limits of ACLS, as the former is consistent with VFS xattr syscalls.

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/xfs_acl.c

index 0ecec1896f25439f198c53c93bc058ff3bff9c89..6888ad886ff6205cc0baf0aa36352fa92f9d93ea 100644 (file)
@@ -281,7 +281,7 @@ xfs_set_acl(struct inode *inode, struct posix_acl *acl, int type)
        if (!acl)
                goto set_acl;
 
-       error = -EINVAL;
+       error = -E2BIG;
        if (acl->a_count > XFS_ACL_MAX_ENTRIES(XFS_M(inode->i_sb)))
                return error;