xattr: Remove unnecessary NULL attribute name check
authorAndreas Gruenbacher <agruenba@redhat.com>
Thu, 29 Sep 2016 15:48:30 +0000 (17:48 +0200)
committerAl Viro <viro@zeniv.linux.org.uk>
Fri, 7 Oct 2016 02:17:38 +0000 (22:17 -0400)
When NULL is passed to one of the xattr system calls as the attribute
name, copying that name from user space already fails with -EFAULT;
xattr_resolve_name is never called with a NULL attribute name.

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
fs/xattr.c

index c243905..1f72c92 100644 (file)
@@ -675,9 +675,6 @@ xattr_resolve_name(const struct xattr_handler **handlers, const char **name)
 {
        const struct xattr_handler *handler;
 
-       if (!*name)
-               return ERR_PTR(-EINVAL);
-
        for_each_xattr_handler(handlers, handler) {
                const char *n;