浏览代码

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

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>
Jie Liu 11 年之前
父节点
当前提交
f2113eb8a4
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      fs/gfs2/acl.c

+ 1 - 1
fs/gfs2/acl.c

@@ -86,7 +86,7 @@ int gfs2_set_acl(struct inode *inode, struct posix_acl *acl, int type)
 	BUG_ON(name == NULL);
 	BUG_ON(name == NULL);
 
 
 	if (acl->a_count > GFS2_ACL_MAX_ENTRIES)
 	if (acl->a_count > GFS2_ACL_MAX_ENTRIES)
-		return -EINVAL;
+		return -E2BIG;
 
 
 	if (type == ACL_TYPE_ACCESS) {
 	if (type == ACL_TYPE_ACCESS) {
 		umode_t mode = inode->i_mode;
 		umode_t mode = inode->i_mode;