From: Mark Vitale Date: Fri, 6 Jun 2014 23:27:04 +0000 (-0400) Subject: opr: opr_AssertionFailed undefined in kernel module X-Git-Tag: upstream/1.8.0_pre1^2~621 X-Git-Url: https://git.michaelhowe.org/gitweb/?a=commitdiff_plain;h=2e2bef28f00f505190c21bd42398f6a01268879c;p=packages%2Fo%2Fopenafs.git opr: opr_AssertionFailed undefined in kernel module The opr_Assert in opr_rbtree_remove is incompletely defined; the opr_Assert macro is defined in opr.h, but the definition for the opr_AssertionFailed routine it invokes is not included. This allows the kernel module to build successfully even though it retains a hidden undefined reference for opr_AssertionFailed. However, the logic in obr_rbtree_remove ensures that this particular opr_Assert can never fail - it is superfluous. Some compilers (e.g. gcc for Linux AFS kernel module builds) are able to recognize this and optimize it out. Others (e.g. Solaris 5.12) do not, and when this happens the OpenAFS build appears to succeed but the kernel module will fail to load due to the undefined symbol. Remove the superfluous opr_Assert. This partially reverts commit 9f8b765bbdbb8913fcadbde8d3362039e9dc8e61. Change-Id: I4ed2b1873c434e41dce0f2e474926bf8b449b819 Reviewed-on: http://gerrit.openafs.org/11296 Tested-by: BuildBot Reviewed-by: Benjamin Kaduk Reviewed-by: Perry Ruiter Reviewed-by: Jeffrey Altman --- diff --git a/src/opr/rbtree.c b/src/opr/rbtree.c index 51907391d..123646404 100644 --- a/src/opr/rbtree.c +++ b/src/opr/rbtree.c @@ -40,7 +40,6 @@ #else # include #endif -#include #include "rbtree.h" @@ -416,10 +415,8 @@ opr_rbtree_remove(struct opr_rbtree *head, struct opr_rbtree_node *node) if (node->left == NULL) child = node->right; - else { - opr_Assert(node->right == NULL); + else child = node->left; - } child->parent = node->parent;