summaryrefslogtreecommitdiffstats
path: root/net/tipc
diff options
context:
space:
mode:
authorAllan Stephens <allan.stephens@windriver.com>2011-11-09 20:22:52 +0100
committerPaul Gortmaker <paul.gortmaker@windriver.com>2012-04-19 21:46:37 +0200
commitfd6eced8a482986784eb1f3aa0838dbdd725e71c (patch)
treeedc9022ebdf66681e1847b1c0e968b3faa5a44ea /net/tipc
parenttipc: Update node-scope publications when network address is assigned (diff)
downloadlinux-fd6eced8a482986784eb1f3aa0838dbdd725e71c.tar.xz
linux-fd6eced8a482986784eb1f3aa0838dbdd725e71c.zip
tipc: Don't record failed publication attempt as a success
No longer increments counter of number of publications by a node if an attempt to add a new publication fails. This prevents TIPC from incorrectly blocking future publications because the configured maximum number of publications has been reached. Signed-off-by: Allan Stephens <allan.stephens@windriver.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
Diffstat (limited to 'net/tipc')
-rw-r--r--net/tipc/name_table.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/net/tipc/name_table.c b/net/tipc/name_table.c
index bd80d80fb112..5d7004262647 100644
--- a/net/tipc/name_table.c
+++ b/net/tipc/name_table.c
@@ -695,11 +695,12 @@ struct publication *tipc_nametbl_publish(u32 type, u32 lower, u32 upper,
}
write_lock_bh(&tipc_nametbl_lock);
- table.local_publ_count++;
publ = tipc_nametbl_insert_publ(type, lower, upper, scope,
tipc_own_addr, port_ref, key);
- if (likely(publ))
+ if (likely(publ)) {
+ table.local_publ_count++;
tipc_named_publish(publ);
+ }
write_unlock_bh(&tipc_nametbl_lock);
return publ;
}