mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-30 03:27:44 -04:00
vfs: Remove vfs_xattr_cmp
This function was only briefly used in security/integrity/evm, between commits66dbc325and15647eb3. Signed-off-by: Andreas Gruenbacher <[email protected]> Reviewed-by: James Morris <[email protected]> Signed-off-by: Al Viro <[email protected]>
This commit is contained in:
parent
527e9316f8
commit
80602324d5
2 changed files with 0 additions and 21 deletions
19
fs/xattr.c
19
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)
|
||||
{
|
||||
|
|
|
|||
Loading…
Reference in a new issue