On Fri, Aug 23, 2013 at 7:45 AM, <zwu.ker...@gmail.com> wrote: > From: Zhi Yong Wu <wu...@linux.vnet.ibm.com> > > Signed-off-by: Zhi Yong Wu <wu...@linux.vnet.ibm.com> > --- > include/linux/rbtree_augmented.h | 3 ++- > lib/rbtree.c | 5 +++-- > 2 files changed, 5 insertions(+), 3 deletions(-)
So, you are saying that the checks are necessary, but you are not saying why. The way I see it, the checks are *not* necessary, because the rbtree invariants guarantee them to be true. The only way for the checks to fail would be if people directly manipulate the rbtrees without going through the proper APIs, and if they do that then I think they're on their own. So to me, I think it's the same situation as dereferencing a pointer without checking if it's NULL, because you know it should never be NULL - which in my eyes is perfectly acceptable. If you really feel this is a problem, you should explain why. I would also prefer if any checks you add could be limited to debug builds. -- Michel "Walken" Lespinasse A program is never fully debugged until the last user dies. -- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/