GFS2: Increase the max number of ACLs
[firefly-linux-kernel-4.4.55.git] / fs / gfs2 / acl.c
index ba9456685f47d761d51afae92a55328e2d54d78a..394dc5561842cf82f2890c6f02f388606d9b6301 100644 (file)
@@ -85,8 +85,8 @@ 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;
+       if (acl->a_count > GFS2_ACL_MAX_ENTRIES(GFS2_SB(inode)))
+               return -E2BIG;
 
        if (type == ACL_TYPE_ACCESS) {
                umode_t mode = inode->i_mode;