Browse Source

[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@ak.jp.nec.com>
Signed-off-by: David Woodhouse <dwmw2@infradead.org>
KaiGai Kohei 19 years ago
parent
commit
a1ae76e96a
1 changed files with 2 additions and 0 deletions
  1. 2 0
      fs/jffs2/acl.c

+ 2 - 0
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) {