Skip to contentSkip to conversation

GFS2: return -E2BIG if hit the maximum limits of ACLs

PATCH New Jeff Liu 2 participants 2 messages Mar 4, 2014 – Mar 6, 2014 GFS2 file system

lore
Share & tools
lore

Jeff Liu

author
#0 lore raw

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

From: Jie Liu <[email protected]>

Return -E2BIG rather than -EINVAL if hit the maximum size limits of ACLs, as the former errno is consistent with VFS xattr syscalls.

This is pointed out by Dave Chinner in previous discussion thread:
http://www.spinics.net/lists/linux-fsdevel/msg71125.html

---
 fs/gfs2/acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/acl.c +1 -1
index ba94566..9c59ebe 100644
@@ -86,7 +86,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 	BUG_ON(name == NULL);
 
 	if (acl->a_count > GFS2_ACL_MAX_ENTRIES)
-		return -EINVAL;
+		return -E2BIG;
 
 	if (type == ACL_TYPE_ACCESS) {
 		umode_t mode = inode->i_mode;
Signature · 1 line
1.8.3.2
#1 lore raw

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

Hi,

Now in the -nmw tree. Thanks,

Steve.

Quoted 26 lines · Jeff Liu

From: Jie Liu <[email protected]>

Return -E2BIG rather than -EINVAL if hit the maximum size limits of ACLs, as the former errno is consistent with VFS xattr syscalls.

This is pointed out by Dave Chinner in previous discussion thread:
http://www.spinics.net/lists/linux-fsdevel/msg71125.html

---
 fs/gfs2/acl.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
fs/gfs2/acl.c +1 -1
index ba94566..9c59ebe 100644
@@ -86,7 +86,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 	BUG_ON(name == NULL);
 
 	if (acl->a_count > GFS2_ACL_MAX_ENTRIES)
-		return -EINVAL;
+		return -E2BIG;
 
 	if (type == ACL_TYPE_ACCESS) {
 		umode_t mode = inode->i_mode;