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: upstream/snapshot3+hdmi~39523^2~8 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=a1ae76e96a18edf4b8a4d4e102762060c26d1c6a;p=platform%2Fadaptation%2Frenesas_rcar%2Frenesas_kernel.git [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 320dd48..9c2077e 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) {