Linux 3.1 compat, kern_path_parent()

Prior to Linux 3.1 the kern_path_parent symbol was exported for
use by kernel modules.  As of Linux 3.1 it is now longer easily
available.  To handle this case the spl will now dynamically
look up address of the missing symbol at module load time.

Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Issue #52
This commit is contained in:
Brian Behlendorf
2011-11-09 12:29:51 -08:00
parent b8b6e4c453
commit 12ff95ff57
7 changed files with 152 additions and 19 deletions
Vendored
+60 -4
View File
@@ -15684,6 +15684,34 @@ _ACEOF
{ $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent exists in header" >&5
$as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; }
header=0
for file in include/linux/namei.h; do
grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
header=1
break;
fi
done
if test $header -eq 0; then
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_KERN_PATH_PARENT_HEADER 1
_ACEOF
fi
{ $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5
$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; }
grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \
@@ -15709,7 +15737,7 @@ $as_echo "no" >&6; }
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_KERN_PATH_PARENT 1
#define HAVE_KERN_PATH_PARENT_SYMBOL 1
_ACEOF
fi
@@ -15718,7 +15746,7 @@ _ACEOF
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_KERN_PATH_PARENT 1
#define HAVE_KERN_PATH_PARENT_SYMBOL 1
_ACEOF
fi
@@ -19885,6 +19913,34 @@ _ACEOF
{ $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent exists in header" >&5
$as_echo_n "checking whether symbol kern_path_parent exists in header... " >&6; }
header=0
for file in include/linux/namei.h; do
grep -q "int kern_path_parent(const char \*, struct nameidata \*)" "$LINUX/$file" 2>/dev/null
rc=$?
if test $rc -eq 0; then
header=1
break;
fi
done
if test $header -eq 0; then
{ $as_echo "$as_me:$LINENO: result: no" >&5
$as_echo "no" >&6; }
else
{ $as_echo "$as_me:$LINENO: result: yes" >&5
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_KERN_PATH_PARENT_HEADER 1
_ACEOF
fi
{ $as_echo "$as_me:$LINENO: checking whether symbol kern_path_parent is exported" >&5
$as_echo_n "checking whether symbol kern_path_parent is exported... " >&6; }
grep -q -E '[[:space:]]kern_path_parent[[:space:]]' \
@@ -19910,7 +19966,7 @@ $as_echo "no" >&6; }
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_KERN_PATH_PARENT 1
#define HAVE_KERN_PATH_PARENT_SYMBOL 1
_ACEOF
fi
@@ -19919,7 +19975,7 @@ _ACEOF
$as_echo "yes" >&6; }
cat >>confdefs.h <<\_ACEOF
#define HAVE_KERN_PATH_PARENT 1
#define HAVE_KERN_PATH_PARENT_SYMBOL 1
_ACEOF
fi