diff options
author | Amar Tumballi <amar@gluster.com> | 2011-04-13 01:01:43 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-04-14 01:01:06 -0700 |
commit | 2eba6dac3f290b6b98a722111c4c7eefd6561416 (patch) | |
tree | 7b68701370cf2d1664bf884be4f5c133200e4e71 /xlators | |
parent | 8132c5317e1a7b261b5c4098f9b85e3e76e9708c (diff) |
mgmt/glusterd: check for 'peerinfo->mgmt' before accessing it
Signed-off-by: Amar Tumballi <amar@gluster.com>
Signed-off-by: Anand Avati <avati@gluster.com>
BUG: 2728 ([glusterfs-3.2.0qa11]: glusterd crashed)
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2728
Diffstat (limited to 'xlators')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 859af80924e..01fe1bb9e12 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -4604,7 +4604,7 @@ glusterd_op_ac_send_lock (glusterd_op_sm_event_t *event, void *ctx) list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); - if (!peerinfo->connected) + if (!peerinfo->connected || !peerinfo->mgmt) continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) @@ -4651,7 +4651,7 @@ glusterd_op_ac_send_unlock (glusterd_op_sm_event_t *event, void *ctx) list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); - if (!peerinfo->connected) + if (!peerinfo->connected || !peerinfo->mgmt) continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) @@ -4863,7 +4863,7 @@ glusterd_op_ac_send_stage_op (glusterd_op_sm_event_t *event, void *ctx) list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); - if (!peerinfo->connected) + if (!peerinfo->connected || !peerinfo->mgmt) continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) @@ -4989,7 +4989,7 @@ glusterd_op_ac_send_commit_op (glusterd_op_sm_event_t *event, void *ctx) list_for_each_entry (peerinfo, &priv->peers, uuid_list) { GF_ASSERT (peerinfo); - if (!peerinfo->connected) + if (!peerinfo->connected || !peerinfo->mgmt) continue; if ((peerinfo->state.state != GD_FRIEND_STATE_BEFRIENDED) && (glusterd_op_get_op() != GD_OP_SYNC_VOLUME)) |