public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Andreas Gruenbacher <agruen@suse.de>
To: Andrew Morton <akpm@osdl.org>
Cc: linux-kernel@vger.kernel.org
Subject: Remove the number of acl entries limit
Date: Sun, 23 Jan 2005 21:13:18 +0100	[thread overview]
Message-ID: <200501232113.19046.agruen@suse.de> (raw)

This patch removes the arbitrary limit of 32 acl entries on ext[23] when
writing acls. A patch that removes the same check when reding acls is in
BK since 12 March 2004, so all kernels since then are already able to
read large acls. I think that ten+ months are enough so that we can now
also remove the write limit.

This is the read-limit patch:
http://linux.bkbits.net:8080/linux-2.6/cset%404051e2863UsuQEgAQShmimgBooAXkg?nav=index.html

Even without this patch the xattr block could already contain less space
than needed for the acl, because other attributes might already use up
almost all space. So this patch does not introduce additional error
conditions. We have been shipping with this patch the last year
(almost).

Signed-off-by: Andreas Gruenbacher <agruen@suse.de>

Index: linux-2.6.11-latest/fs/ext2/acl.c
===================================================================
--- linux-2.6.11-latest.orig/fs/ext2/acl.c
+++ linux-2.6.11-latest/fs/ext2/acl.c
@@ -255,8 +255,6 @@ ext2_set_acl(struct inode *inode, int ty
 			return -EINVAL;
 	}
  	if (acl) {
-		if (acl->a_count > EXT2_ACL_MAX_ENTRIES)
-			return -EINVAL;
 		value = ext2_acl_to_disk(acl, &size);
 		if (IS_ERR(value))
 			return (int)PTR_ERR(value);
Index: linux-2.6.11-latest/fs/ext2/acl.h
===================================================================
--- linux-2.6.11-latest.orig/fs/ext2/acl.h
+++ linux-2.6.11-latest/fs/ext2/acl.h
@@ -7,7 +7,6 @@
 #include <linux/xattr_acl.h>
 
 #define EXT2_ACL_VERSION	0x0001
-#define EXT2_ACL_MAX_ENTRIES	32
 
 typedef struct {
 	__le16		e_tag;
Index: linux-2.6.11-latest/fs/ext3/acl.c
===================================================================
--- linux-2.6.11-latest.orig/fs/ext3/acl.c
+++ linux-2.6.11-latest/fs/ext3/acl.c
@@ -259,8 +259,6 @@ ext3_set_acl(handle_t *handle, struct in
 			return -EINVAL;
 	}
  	if (acl) {
-		if (acl->a_count > EXT3_ACL_MAX_ENTRIES)
-			return -EINVAL;
 		value = ext3_acl_to_disk(acl, &size);
 		if (IS_ERR(value))
 			return (int)PTR_ERR(value);
Index: linux-2.6.11-latest/fs/ext3/acl.h
===================================================================
--- linux-2.6.11-latest.orig/fs/ext3/acl.h
+++ linux-2.6.11-latest/fs/ext3/acl.h
@@ -7,7 +7,6 @@
 #include <linux/xattr_acl.h>
 
 #define EXT3_ACL_VERSION	0x0001
-#define EXT3_ACL_MAX_ENTRIES	32
 
 typedef struct {
 	__le16		e_tag;


Regards,
-- 
Andreas Gruenbacher <agruen@suse.de>
SUSE Labs, SUSE LINUX PRODUCTS GMBH

                 reply	other threads:[~2005-01-23 20:13 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=200501232113.19046.agruen@suse.de \
    --to=agruen@suse.de \
    --cc=akpm@osdl.org \
    --cc=linux-kernel@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox