From: KaiGai Kohei Date: Sun, 11 Jun 2006 01:45:22 +0000 (+0900) Subject: [JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL. X-Git-Tag: v2.6.18-rc1~458^2~8 X-Git-Url: https://err.no/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=a1ae76e96a18edf4b8a4d4e102762060c26d1c6a;p=linux-2.6 [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 Signed-off-by: David Woodhouse --- diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 320dd48b83..9c2077e7e0 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -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) {