Lines Matching refs:cs
13 struct ceph_string *cs, *exist; in ceph_find_or_create_string() local
40 cs = kmalloc(sizeof(*cs) + len + 1, GFP_NOFS); in ceph_find_or_create_string()
41 if (!cs) in ceph_find_or_create_string()
44 kref_init(&cs->kref); in ceph_find_or_create_string()
45 cs->len = len; in ceph_find_or_create_string()
46 memcpy(cs->str, str, len); in ceph_find_or_create_string()
47 cs->str[len] = 0; in ceph_find_or_create_string()
68 rb_link_node(&cs->node, parent, p); in ceph_find_or_create_string()
69 rb_insert_color(&cs->node, &string_tree); in ceph_find_or_create_string()
80 kfree(cs); in ceph_find_or_create_string()
81 cs = exist; in ceph_find_or_create_string()
84 return cs; in ceph_find_or_create_string()
90 struct ceph_string *cs = container_of(ref, struct ceph_string, kref); in ceph_release_string() local
93 if (!RB_EMPTY_NODE(&cs->node)) { in ceph_release_string()
94 rb_erase(&cs->node, &string_tree); in ceph_release_string()
95 RB_CLEAR_NODE(&cs->node); in ceph_release_string()
99 kfree_rcu(cs, rcu); in ceph_release_string()