Skip to content

Commit

Permalink
[JFFS2][XATTR] Fix ACL bug when updating null xattr by null ACL.
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
KaiGai Kohei authored and David Woodhouse committed Jun 27, 2006
1 parent c9f700f commit a1ae76e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions fs/jffs2/acl.c
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit a1ae76e

Please sign in to comment.