aboutsummaryrefslogtreecommitdiffstats
path: root/net/tipc/cluster.h
diff options
context:
space:
mode:
Diffstat (limited to 'net/tipc/cluster.h')
-rw-r--r--net/tipc/cluster.h12
1 files changed, 4 insertions, 8 deletions
diff --git a/net/tipc/cluster.h b/net/tipc/cluster.h
index 32636d98c9c6..21493f7beb95 100644
--- a/net/tipc/cluster.h
+++ b/net/tipc/cluster.h
@@ -38,14 +38,13 @@
38#define _TIPC_CLUSTER_H 38#define _TIPC_CLUSTER_H
39 39
40#include "addr.h" 40#include "addr.h"
41#include "zone.h" 41#include "net.h"
42 42
43#define LOWEST_SLAVE 2048u 43#define LOWEST_SLAVE 2048u
44 44
45/** 45/**
46 * struct cluster - TIPC cluster structure 46 * struct cluster - TIPC cluster structure
47 * @addr: network address of cluster 47 * @addr: network address of cluster
48 * @owner: pointer to zone that cluster belongs to
49 * @nodes: array of pointers to all nodes within cluster 48 * @nodes: array of pointers to all nodes within cluster
50 * @highest_node: id of highest numbered node within cluster 49 * @highest_node: id of highest numbered node within cluster
51 * @highest_slave: (used for secondary node support) 50 * @highest_slave: (used for secondary node support)
@@ -53,7 +52,6 @@
53 52
54struct cluster { 53struct cluster {
55 u32 addr; 54 u32 addr;
56 struct _zone *owner;
57 struct tipc_node **nodes; 55 struct tipc_node **nodes;
58 u32 highest_node; 56 u32 highest_node;
59 u32 highest_slave; 57 u32 highest_slave;
@@ -82,11 +80,9 @@ void tipc_cltr_bcast_lost_route(struct cluster *c_ptr, u32 dest, u32 lo, u32 hi)
82 80
83static inline struct cluster *tipc_cltr_find(u32 addr) 81static inline struct cluster *tipc_cltr_find(u32 addr)
84{ 82{
85 struct _zone *z_ptr = tipc_zone_find(addr); 83 if (!in_own_cluster(addr))
86 84 return NULL;
87 if (z_ptr) 85 return tipc_net.clusters[1];
88 return z_ptr->clusters[1];
89 return NULL;
90} 86}
91 87
92#endif 88#endif