From: Andreas Gruenbacher Date: Wed, 2 Dec 2015 13:44:33 +0000 (+0100) Subject: vfs: Remove vfs_xattr_cmp X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=80602324d5a02fea97ed1328ba04e5d7f10aaff8;p=GitHub%2Fmoto-9609%2Fandroid_kernel_motorola_exynos9610.git vfs: Remove vfs_xattr_cmp This function was only briefly used in security/integrity/evm, between commits 66dbc325 and 15647eb3. Signed-off-by: Andreas Gruenbacher Reviewed-by: James Morris Signed-off-by: Al Viro --- diff --git a/fs/xattr.c b/fs/xattr.c index 9b932b95d74e..58bdabcc9d35 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 89474b9d260c..45fa3456a0cc 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;