1
0
Fork 0

[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>
hifive-unleashed-5.1
KaiGai Kohei 2006-06-11 10:45:22 +09:00 committed by David Woodhouse
parent c9f700f840
commit a1ae76e96a
1 changed files with 2 additions and 0 deletions

View 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) {