summaryrefslogtreecommitdiff
path: root/fs/reiserfs/xattr_security.c
diff options
context:
space:
mode:
authorAlex Shi <alex.shi@linaro.org>2016-10-24 12:30:04 +0800
committerAlex Shi <alex.shi@linaro.org>2016-10-24 12:30:04 +0800
commit59628a48e83c96ae3d6426391d93281e53c48462 (patch)
tree0b26c31bc01dea9bf476e8baf68e98782db45e7e /fs/reiserfs/xattr_security.c
parent1a88e2aad5d0633e5c316af1d50c27aa0b22155d (diff)
parent3afd8362fabd167bb04f79501f21dd67aa9cb99f (diff)
Merge tag 'v4.4.27' into linux-linaro-lsk-v4.4
This is the 4.4.27 stable release
Diffstat (limited to 'fs/reiserfs/xattr_security.c')
-rw-r--r--fs/reiserfs/xattr_security.c14
1 files changed, 6 insertions, 8 deletions
diff --git a/fs/reiserfs/xattr_security.c b/fs/reiserfs/xattr_security.c
index ac659af431ae..60de069225ba 100644
--- a/fs/reiserfs/xattr_security.c
+++ b/fs/reiserfs/xattr_security.c
@@ -12,26 +12,24 @@ static int
security_get(const struct xattr_handler *handler, struct dentry *dentry,
const char *name, void *buffer, size_t size)
{
- if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
- return -EINVAL;
-
if (IS_PRIVATE(d_inode(dentry)))
return -EPERM;
- return reiserfs_xattr_get(d_inode(dentry), name, buffer, size);
+ return reiserfs_xattr_get(d_inode(dentry),
+ xattr_full_name(handler, name),
+ buffer, size);
}
static int
security_set(const struct xattr_handler *handler, struct dentry *dentry,
const char *name, const void *buffer, size_t size, int flags)
{
- if (strlen(name) < sizeof(XATTR_SECURITY_PREFIX))
- return -EINVAL;
-
if (IS_PRIVATE(d_inode(dentry)))
return -EPERM;
- return reiserfs_xattr_set(d_inode(dentry), name, buffer, size, flags);
+ return reiserfs_xattr_set(d_inode(dentry),
+ xattr_full_name(handler, name),
+ buffer, size, flags);
}
static size_t security_list(const struct xattr_handler *handler,