summaryrefslogtreecommitdiff
path: root/fs/jffs2/xattr_user.c
diff options
context:
space:
mode:
authorAndreas Gruenbacher <agruenba@redhat.com>2015-12-02 13:44:43 (GMT)
committerAl Viro <viro@zeniv.linux.org.uk>2015-12-14 00:46:12 (GMT)
commit764a5c6b1fa4306dd7573c1d80914254909cd036 (patch)
tree6e5ceb636c3b53cdc0994cf8c2415656e2b12e82 /fs/jffs2/xattr_user.c
parent1046cb119521b5e1881f380dc99729fc84c96661 (diff)
downloadlinux-764a5c6b1fa4306dd7573c1d80914254909cd036.tar.xz
xattr handlers: Simplify list operation
Change the list operation to only return whether or not an attribute should be listed. Copying the attribute names into the buffer is moved to the callers. Since the result only depends on the dentry and not on the attribute name, we do not pass the attribute name to list operations. Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'fs/jffs2/xattr_user.c')
-rw-r--r--fs/jffs2/xattr_user.c16
1 files changed, 0 insertions, 16 deletions
diff --git a/fs/jffs2/xattr_user.c b/fs/jffs2/xattr_user.c
index b04335b..539bd63 100644
--- a/fs/jffs2/xattr_user.c
+++ b/fs/jffs2/xattr_user.c
@@ -32,24 +32,8 @@ static int jffs2_user_setxattr(const struct xattr_handler *handler,
name, buffer, size, flags);
}
-static size_t jffs2_user_listxattr(const struct xattr_handler *handler,
- struct dentry *dentry, char *list,
- size_t list_size, const char *name,
- size_t name_len)
-{
- size_t retlen = XATTR_USER_PREFIX_LEN + name_len + 1;
-
- if (list && retlen <= list_size) {
- strcpy(list, XATTR_USER_PREFIX);
- strcpy(list + XATTR_USER_PREFIX_LEN, name);
- }
-
- return retlen;
-}
-
const struct xattr_handler jffs2_user_xattr_handler = {
.prefix = XATTR_USER_PREFIX,
- .list = jffs2_user_listxattr,
.set = jffs2_user_setxattr,
.get = jffs2_user_getxattr
};