[Ocfs2-devel] [patch 3/3] ocfs2-timeout-protocol.patch
Zach Brown
zach.brown at oracle.com
Mon Dec 4 15:59:36 PST 2006
> + if (old_sc != sc) {
> + if (old_sc)
> + atomic_dec(&o2net_connected_peers);
> + else
> + atomic_inc(&o2net_connected_peers);
> + }
It occurs to me that this probably doesn't catch all cases. Imagine
old_sc and sc both being non-null. It'd dec when it shouldn't change.
How about:
if (old_sc && !sc)
dec
else if (!old_sc && sc)
inc
Otherwise it seems OK.
- z
More information about the Ocfs2-devel
mailing list