[JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL.

Linux-MTD Mailing List linux-mtd at lists.infradead.org
Tue Jun 27 11:59:02 EDT 2006


Commit:     a1ae76e96a18edf4b8a4d4e102762060c26d1c6a
Parent:     c9f700f840bd481b3e01fcad1ba8da01794a6726
commit a1ae76e96a18edf4b8a4d4e102762060c26d1c6a
Author:     KaiGai Kohei <kaigai at ak.jp.nec.com>
AuthorDate: Sun Jun 11 10:45:22 2006 +0900
Commit:     David Woodhouse <dwmw2 at infradead.org>
CommitDate: Tue Jun 27 16:17:04 2006 +0100

    [JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL.
    
    This patch enable to handle the case when updating null xattr
    by null ACL.
    
    When we try to set NULL into NULL xattr, xattr subsystem returns
    -ENODATA. This patch enables to handle this error code.
    
    [2/3] jffs2-xattr-v6-02-fix_posixacl_bug.patch
    
    Signed-off-by: KaiGai Kohei <kaigai at ak.jp.nec.com>
    Signed-off-by: David Woodhouse <dwmw2 at infradead.org>
---
 fs/jffs2/acl.c |    2 ++
 1 files changed, 2 insertions(+), 0 deletions(-)

diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c
index 320dd48..9c2077e 100644
--- a/fs/jffs2/acl.c
+++ b/fs/jffs2/acl.c
@@ -267,6 +267,8 @@ static int jffs2_set_acl(struct inode *i
 	}
 
 	rc = do_jffs2_setxattr(inode, xprefix, "", value, size, 0);
+	if (!value && rc == -ENODATA)
+		rc = 0;
 	if (value)
 		kfree(value);
 	if (!rc) {



More information about the linux-mtd-cvs mailing list