From: Andreas Gruenbacher <agruenba@redhat.com>
To: Alexander Viro <viro@zeniv.linux.org.uk>,
Christoph Hellwig <hch@infradead.org>,
linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org
Cc: Andreas Gruenbacher <agruenba@redhat.com>
Subject: [PATCH 01/10] vfs: Remove vfs_xattr_cmp
Date: Mon, 30 Nov 2015 22:43:34 +0100 [thread overview]
Message-ID: <1448919823-27103-2-git-send-email-agruenba@redhat.com> (raw)
In-Reply-To: <1448919823-27103-1-git-send-email-agruenba@redhat.com>
This function was only briefly used in security/integrity/evm, between
commits 66dbc325 and 15647eb3.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.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
next prev parent reply other threads:[~2015-11-30 21:47 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-11-30 21:43 [PATCH 00/10] xattr cleanups Andreas Gruenbacher
2015-11-30 21:43 ` Andreas Gruenbacher [this message]
2015-12-01 9:30 ` [PATCH 01/10] vfs: Remove vfs_xattr_cmp James Morris
2015-11-30 21:43 ` [PATCH 02/10] gfs2: Remove gfs2_xattr_acl_chmod Andreas Gruenbacher
2015-12-01 9:31 ` James Morris
2015-12-01 19:07 ` Bob Peterson
2015-11-30 21:43 ` [PATCH 03/10] posix acls: Remove duplicate xattr name definitions Andreas Gruenbacher
2015-12-01 9:32 ` James Morris
2015-11-30 21:43 ` [PATCH 04/10] vfs: Distinguish between full xattr names and proper prefixes Andreas Gruenbacher
2015-12-01 9:42 ` James Morris
2015-12-02 13:45 ` Andreas Gruenbacher
2015-11-30 21:43 ` [PATCH 05/10] btrfs: Use xattr handler infrastructure Andreas Gruenbacher
2015-12-01 15:13 ` David Sterba
2015-11-30 21:43 ` [PATCH 06/10] tmpfs: " Andreas Gruenbacher
2015-12-01 9:43 ` James Morris
2015-11-30 21:43 ` [PATCH 07/10] tmpfs: listxattr should include POSIX ACL xattrs Andreas Gruenbacher
2015-12-01 9:45 ` James Morris
2015-11-30 21:43 ` [PATCH 08/10] xfs: Change how listxattr generates synthetic attributes Andreas Gruenbacher
2015-11-30 21:43 ` [PATCH 09/10] nfs: Move call to security_inode_listsecurity into nfs_listxattr Andreas Gruenbacher
2015-11-30 21:43 ` [PATCH 10/10] xattr handlers: Simplify list operation Andreas Gruenbacher
2015-12-01 9:53 ` James Morris
2015-12-01 10:30 ` Andreas Grünbacher
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1448919823-27103-2-git-send-email-agruenba@redhat.com \
--to=agruenba@redhat.com \
--cc=hch@infradead.org \
--cc=linux-fsdevel@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@zeniv.linux.org.uk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).