Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.kernel > #1281786

[PATCH v2 01/11] vfs: Remove vfs_xattr_cmp

From Andreas Gruenbacher <agruenba@redhat.com>
Newsgroups linux.kernel
Subject [PATCH v2 01/11] vfs: Remove vfs_xattr_cmp
Date 2015-12-02 14:50 +0100
Message-ID <qBfXb-7QB-7@gated-at.bofh.it> (permalink)
References <qBfXb-7QB-5@gated-at.bofh.it>
Organization linux.* mail to news gateway

Show all headers | View raw


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

Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Reviewed-by: James Morris <james.l.morris@oracle.com>
---
 fs/xattr.c            | 19 -------------------
 include/linux/xattr.h |  2 --
 2 files changed, 21 deletions(-)

diff --git a/fs/xattr.c b/fs/xattr.c
index 9b932b9..58bdabc 100644
--- a/fs/xattr.c
+++ b/fs/xattr.c
@@ -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)
 {
diff --git a/include/linux/xattr.h b/include/linux/xattr.h
index 89474b9..45fa345 100644
--- a/include/linux/xattr.h
+++ b/include/linux/xattr.h
@@ -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;
-- 
2.5.0

--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Back to linux.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

[PATCH v2 00/11] xattr cleanups Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 01/11] vfs: Remove vfs_xattr_cmp Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 05/11] btrfs: Use xattr handler infrastructure Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 10/11] ocfs2: Replace list xattr handler operations Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 03/11] posix acls: Remove duplicate xattr name definitions Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 11/11] xattr handlers: Simplify list operation Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 04/11] vfs: Distinguish between full xattr names and proper prefixes Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 06/11] tmpfs: Use xattr handler infrastructure Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 07/11] tmpfs: listxattr should include POSIX ACL xattrs Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 08/11] xfs: Change how listxattr generates synthetic attributes Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 09/11] nfs: Move call to security_inode_listsecurity into nfs_listxattr Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100
  [PATCH v2 02/11] gfs2: Remove gfs2_xattr_acl_chmod Andreas Gruenbacher <agruenba@redhat.com> - 2015-12-02 14:50 +0100

csiph-web