Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1754940AbbK3Vr0 (ORCPT ); Mon, 30 Nov 2015 16:47:26 -0500 Received: from mx1.redhat.com ([209.132.183.28]:44802 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1754978AbbK3Vnv (ORCPT ); Mon, 30 Nov 2015 16:43:51 -0500 From: Andreas Gruenbacher To: Alexander Viro , Christoph Hellwig , linux-kernel@vger.kernel.org, linux-fsdevel@vger.kernel.org Cc: Andreas Gruenbacher Subject: [PATCH 01/10] vfs: Remove vfs_xattr_cmp Date: Mon, 30 Nov 2015 22:43:34 +0100 Message-Id: <1448919823-27103-2-git-send-email-agruenba@redhat.com> In-Reply-To: <1448919823-27103-1-git-send-email-agruenba@redhat.com> References: <1448919823-27103-1-git-send-email-agruenba@redhat.com> Sender: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 1912 Lines: 60 This function was only briefly used in security/integrity/evm, between commits 66dbc325 and 15647eb3. Signed-off-by: Andreas Gruenbacher --- 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/