If the banned pnn is not the local node, the function returns early.
So no need for additional check.
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
(cherry picked from commit
297d93cecc3c0655e72ecac38508e113bdbeab9c)
ctdb->nodes[bantime->pnn]->flags |= NODE_FLAGS_BANNED;
event_add_timed(ctdb->ev, ctdb->banning_ctx, timeval_current_ofs(bantime->time,0), ctdb_ban_node_event, ctdb);
- if (bantime->pnn == ctdb->pnn) {
- ctdb_local_node_got_banned(ctdb);
- }
+ ctdb_local_node_got_banned(ctdb);
return 0;
}