summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-10-09 00:25:42 +0300
committerAmar Tumballi <amarts@gmail.com>2019-10-11 03:58:43 +0000
commit0a9ca8162725b2f6b17a4d2e8cc863d27bb8770e (patch)
tree42fa31776e52ee3592c8c4dab3a56e32d0d880ec
parent79f69d9b4f3c4fdf77dc77989447b6f1d5d5c658 (diff)
dict.{c,h}: remove the lock from the _data struct
I'm not sure why it was there and I did not see any use for it. In the hope I did not miss anything, I removed it. Change-Id: I02fa2e8e2a598b488fddbff4c7168dc4a41929b2 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
-rw-r--r--libglusterfs/src/dict.c4
-rw-r--r--libglusterfs/src/glusterfs/dict.h1
2 files changed, 0 insertions, 5 deletions
diff --git a/libglusterfs/src/dict.c b/libglusterfs/src/dict.c
index 12184f0..b790c93 100644
--- a/libglusterfs/src/dict.c
+++ b/libglusterfs/src/dict.c
@@ -57,7 +57,6 @@ get_new_data()
GF_ATOMIC_INIT(data->refcount, 0);
data->is_static = _gf_false;
- LOCK_INIT(&data->lock);
return data;
}
@@ -293,8 +292,6 @@ void
data_destroy(data_t *data)
{
if (data) {
- LOCK_DESTROY(&data->lock);
-
if (!data->is_static)
GF_FREE(data->data);
@@ -325,7 +322,6 @@ data_copy(data_t *old)
}
newdata->data_type = old->data_type;
- LOCK_INIT(&newdata->lock);
return newdata;
err_out:
diff --git a/libglusterfs/src/glusterfs/dict.h b/libglusterfs/src/glusterfs/dict.h
index 3533725..bfb01af 100644
--- a/libglusterfs/src/glusterfs/dict.h
+++ b/libglusterfs/src/glusterfs/dict.h
@@ -97,7 +97,6 @@ typedef struct _data_pair data_pair_t;
struct _data {
char *data;
gf_atomic_t refcount;
- gf_lock_t lock;
gf_dict_data_type_t data_type;
int32_t len;
gf_boolean_t is_static;