GFS2: return -E2BIG if hit the maximum limits of ACLs
authorJie Liu <jeff.liu@oracle.com>
Tue, 4 Mar 2014 03:28:39 +0000 (11:28 +0800)
committerSteven Whitehouse <swhiteho@redhat.com>
Thu, 6 Mar 2014 10:39:32 +0000 (10:39 +0000)
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

Signed-off-by: Jie Liu <jeff.liu@oracle.com>
Signed-off-by: Steven Whitehouse <swhiteho@redhat.com>
fs/gfs2/acl.c

index ba9456685f47d761d51afae92a55328e2d54d78a..9c59ebe790b6ac9cae5f529ee2c9029e813b6fda 100644 (file)
@@ -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;