[JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL.
authorKaiGai Kohei <kaigai@ak.jp.nec.com>
Sun, 11 Jun 2006 01:45:22 +0000 (10:45 +0900)
committerDavid Woodhouse <dwmw2@infradead.org>
Tue, 27 Jun 2006 15:17:04 +0000 (16:17 +0100)
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@ak.jp.nec.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
fs/jffs2/acl.c

index 320dd48..9c2077e 100644 (file)
@@ -267,6 +267,8 @@ static int jffs2_set_acl(struct inode *inode, int type, struct posix_acl *acl)
        }
 
        rc = do_jffs2_setxattr(inode, xprefix, "", value, size, 0);
+       if (!value && rc == -ENODATA)
+               rc = 0;
        if (value)
                kfree(value);
        if (!rc) {