From a1ae76e96a18edf4b8a4d4e102762060c26d1c6a Mon Sep 17 00:00:00 2001 From: KaiGai Kohei Date: Sun, 11 Jun 2006 10:45:22 +0900 Subject: [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 --- fs/jffs2/acl.c | 2 ++ 1 file changed, 2 insertions(+) (limited to 'fs') 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) { -- cgit v1.1