summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAmar Tumballi <amar@gluster.com>2011-08-01 16:20:12 +0530
committerAnand Avati <avati@gluster.com>2011-08-03 22:33:53 -0700
commit3780881e1bc4387f55e065508fb8fad371fc2b51 (patch)
treef3dcf20e7f1901f55313c5ca79fa6df4659c1623
parent3778cb5f668149d893ff6ae09d73878afc957133 (diff)
storage/posix: handle dictionary being NULL in a function
also print a warning message if dictionary is NULL, while sending a mkdir request in distribute self-heal. Change-Id: Ib9cac6ed1635203802f089986f8acb1ce416265d BUG: 3215 Reviewed-on: http://review.gluster.com/136 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com>
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c2
-rw-r--r--xlators/storage/posix/src/posix-helpers.c3
2 files changed, 4 insertions, 1 deletions
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index 8245cacdc..377dd6ffa 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -414,7 +414,7 @@ dht_selfheal_dir_mkdir (call_frame_t *frame, loc_t *loc,
}
if (!dict)
- gf_log (this->name, GF_LOG_DEBUG,
+ gf_log (this->name, GF_LOG_WARNING,
"dict is NULL, need to make sure gfid's are same");
for (i = 0; i < layout->cnt; i++) {
diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c
index 484e38c71..249a82515 100644
--- a/xlators/storage/posix/src/posix-helpers.c
+++ b/xlators/storage/posix/src/posix-helpers.c
@@ -824,6 +824,9 @@ posix_entry_create_xattr_set (xlator_t *this, const char *path,
data_pair_t *trav = NULL;
int ret = -1;
+ if (!dict)
+ goto out;
+
trav = dict->members_list;
while (trav) {
if (!strcmp (GFID_XATTR_KEY, trav->key) ||