[v3,01/17] xattr: Remove unnecessary NULL attribute name check
diff mbox

Message ID 1464598653-3656-2-git-send-email-agruenba@redhat.com
State New
Headers show

Commit Message

Andreas Gruenbacher May 30, 2016, 8:57 a.m. UTC
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>
---
 fs/xattr.c | 3 ---
 1 file changed, 3 deletions(-)

Patch
diff mbox

diff --git a/fs/xattr.c b/fs/xattr.c
index 4beafc4..75f9f14 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -668,9 +668,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;