Message ID | 4B2F631F.4070303@gmail.com |
---|---|
State | New, archived |
Headers | show |
diff --git a/fs/jffs2/acl.c b/fs/jffs2/acl.c index 7cdc319..1eb4726 100644 --- a/fs/jffs2/acl.c +++ b/fs/jffs2/acl.c @@ -403,13 +403,10 @@ static int jffs2_acl_setxattr(struct dentry *dentry, const char *name, if (value) { acl = posix_acl_from_xattr(value, size); - if (IS_ERR(acl)) - return PTR_ERR(acl); - if (acl) { - rc = posix_acl_valid(acl); - if (rc) - goto out; - } + rc = posix_acl_valid(acl); + if (rc) + goto out; + } else { acl = NULL;
move the ACL validation check in to fs/posix_acl.c. Including nullpointer check and PTR_ERR check. --- Signed-off-by: Liuwenyi <qingshenlwy@gmail.com> Cc: David Woodhouse <dwmw2@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Cc: James Morris <jmorris@namei.org> Cc: Andrew Morton <akpm@linux-foundation.org> Cc: Joel Becker <joel.becker@oracle.com> Cc: Serge Hallyn <serue@us.ibm.com> Cc: linux-mtd@lists.infradead.org Cc: linux-kernel@vger.kernel.org --- }