Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 80602324 authored by Andreas Gruenbacher's avatar Andreas Gruenbacher Committed by Al Viro
Browse files

vfs: Remove vfs_xattr_cmp



This function was only briefly used in security/integrity/evm, between
commits 66dbc325 and 15647eb3.

Signed-off-by: default avatarAndreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: default avatarJames Morris <james.l.morris@oracle.com>
Signed-off-by: default avatarAl Viro <viro@zeniv.linux.org.uk>
parent 527e9316
Loading
Loading
Loading
Loading
+0 −19
Original line number Diff line number Diff line
@@ -208,25 +208,6 @@ vfs_getxattr_alloc(struct dentry *dentry, const char *name, char **xattr_value,
	return error;
}

/* Compare an extended attribute value with the given value */
int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
		  const char *value, size_t size, gfp_t flags)
{
	char *xattr_value = NULL;
	int rc;

	rc = vfs_getxattr_alloc(dentry, xattr_name, &xattr_value, 0, flags);
	if (rc < 0)
		return rc;

	if ((rc != size) || (memcmp(xattr_value, value, rc) != 0))
		rc = -EINVAL;
	else
		rc = 0;
	kfree(xattr_value);
	return rc;
}

ssize_t
vfs_getxattr(struct dentry *dentry, const char *name, void *value, size_t size)
{
+0 −2
Original line number Diff line number Diff line
@@ -53,8 +53,6 @@ int generic_setxattr(struct dentry *dentry, const char *name, const void *value,
int generic_removexattr(struct dentry *dentry, const char *name);
ssize_t vfs_getxattr_alloc(struct dentry *dentry, const char *name,
			   char **xattr_value, size_t size, gfp_t flags);
int vfs_xattr_cmp(struct dentry *dentry, const char *xattr_name,
		  const char *value, size_t size, gfp_t flags);

struct simple_xattrs {
	struct list_head head;