summaryrefslogtreecommitdiff
path: root/fs/ceph/xattr.c
diff options
context:
space:
mode:
authorDavid Disseldorp <ddiss@suse.de>2019-04-18 15:15:49 +0300
committerIlya Dryomov <idryomov@gmail.com>2019-07-08 15:01:41 +0300
commitd0f191d20c1ce22ccfd7c8e2327f19fbba7f7521 (patch)
treea0eb0b9ccb1f21768b00ef35de06d5d7780844dc /fs/ceph/xattr.c
parent2b2abcac8c251d1c77a4cc9d9f248daefae0fb4e (diff)
downloadlinux-d0f191d20c1ce22ccfd7c8e2327f19fbba7f7521.tar.xz
ceph: remove unused vxattr length helpers
ceph_listxattr() now calculates the length of vxattrs dynamically, so these helpers, which incorrectly ignore vxattr.exists_cb(), can be removed. Signed-off-by: David Disseldorp <ddiss@suse.de> Reviewed-by: "Yan, Zheng" <zyan@redhat.com> Signed-off-by: Ilya Dryomov <idryomov@gmail.com>
Diffstat (limited to 'fs/ceph/xattr.c')
-rw-r--r--fs/ceph/xattr.c43
1 files changed, 0 insertions, 43 deletions
diff --git a/fs/ceph/xattr.c b/fs/ceph/xattr.c
index ffbe1c006bb6..57350e4b7da0 100644
--- a/fs/ceph/xattr.c
+++ b/fs/ceph/xattr.c
@@ -363,7 +363,6 @@ static struct ceph_vxattr ceph_dir_vxattrs[] = {
},
{ .name = NULL, 0 } /* Required table terminator */
};
-static size_t ceph_dir_vxattrs_name_size; /* total size of all names */
/* files */
@@ -389,7 +388,6 @@ static struct ceph_vxattr ceph_file_vxattrs[] = {
},
{ .name = NULL, 0 } /* Required table terminator */
};
-static size_t ceph_file_vxattrs_name_size; /* total size of all names */
static struct ceph_vxattr *ceph_inode_vxattrs(struct inode *inode)
{
@@ -400,47 +398,6 @@ static struct ceph_vxattr *ceph_inode_vxattrs(struct inode *inode)
return NULL;
}
-static size_t ceph_vxattrs_name_size(struct ceph_vxattr *vxattrs)
-{
- if (vxattrs == ceph_dir_vxattrs)
- return ceph_dir_vxattrs_name_size;
- if (vxattrs == ceph_file_vxattrs)
- return ceph_file_vxattrs_name_size;
- BUG_ON(vxattrs);
- return 0;
-}
-
-/*
- * Compute the aggregate size (including terminating '\0') of all
- * virtual extended attribute names in the given vxattr table.
- */
-static size_t __init vxattrs_name_size(struct ceph_vxattr *vxattrs)
-{
- struct ceph_vxattr *vxattr;
- size_t size = 0;
-
- for (vxattr = vxattrs; vxattr->name; vxattr++) {
- if (!(vxattr->flags & VXATTR_FLAG_HIDDEN))
- size += vxattr->name_size;
- }
-
- return size;
-}
-
-/* Routines called at initialization and exit time */
-
-void __init ceph_xattr_init(void)
-{
- ceph_dir_vxattrs_name_size = vxattrs_name_size(ceph_dir_vxattrs);
- ceph_file_vxattrs_name_size = vxattrs_name_size(ceph_file_vxattrs);
-}
-
-void ceph_xattr_exit(void)
-{
- ceph_dir_vxattrs_name_size = 0;
- ceph_file_vxattrs_name_size = 0;
-}
-
static struct ceph_vxattr *ceph_match_vxattr(struct inode *inode,
const char *name)
{