Skip to contentSkip to conversation

xfs: return -E2BIG if hit the maximum size limits of ACLs

PATCH In review Jeff Liu 2 participants 4 messages Jan 31, 2014 – Mar 7, 2014 XFS filesystem

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

PATCH 1/1 xfs: return -E2BIG if hit the maximum size limits of ACLs

From: Jie Liu <[email protected]>

We should return -E2BIG rather than -EINVAL if hit the maximum size limits of ACLS, as the former is consistent with VFS xattr syscalls.

---
 fs/xfs/xfs_acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/xfs/xfs_acl.c +1 -1
index 370eb3e..fd4e8ff 100644
@@ -397,7 +397,7 @@ xfs_xattr_acl_set(struct dentry *dentry, const char *name,
 	if (error)
 		goto out_release;
 
-	error = -EINVAL;
+	error = -E2BIG;
 	if (acl->a_count > XFS_ACL_MAX_ENTRIES(XFS_M(inode->i_sb)))
 		goto out_release;
 
Signature · 6 lines
1.8.3.2

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
Reviewed-by on v1 1/1
#1 lore raw
Quoted 4 lines · Jeff Liu

From: Jie Liu <[email protected]>

We should return -E2BIG rather than -EINVAL if hit the maximum size limits of ACLS, as the former is consistent with VFS xattr syscalls.

Looks good,

You were already working on tests for this area, right?

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

author
#2 lore raw
Quoted 11 lines · Christoph Hellwig
Quoted 4 lines · Jeff Liu

From: Jie Liu <[email protected]>

We should return -E2BIG rather than -EINVAL if hit the maximum size limits of ACLS, as the former is consistent with VFS xattr syscalls.

Looks good,

You were already working on tests for this area, right?

Not yet, but I'll work out a separate generic test towards ACLs.

Thanks,
-Jeff

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs