Whamcloud - gitweb
LU-9859 libcfs: handle missing refcount.h 90/38390/3
authorJames Simmons <jsimmons@infradead.org>
Wed, 29 Apr 2020 12:32:39 +0000 (08:32 -0400)
committerOleg Drokin <green@whamcloud.com>
Thu, 7 May 2020 05:43:11 +0000 (05:43 +0000)
Recently the OpenSFS tree was modified to make backported headers to
appear like native Linux kernel headers to avoid ifdef handling. One
missed is refcount.h. Rename linux-refcount.h to refcount.h to make
it look like the native kernel version. Change EXTRA_KCFLAGS to not
include the Lustre include directories since it contains the fake
kernel headers in the autoconf test. Also remove stray
LC_REPLACE_EXCEPTIONAL_ENTRIES.

Change-Id: Ia5de6dab0837db419a6b02b3b2a6ddeb6bb62f03
Test-Parameters: trivial
Fixes: 742897a967cf ("LU-13274 uapi: make lnet UAPI headers C99 compliant")
Signed-off-by: James Simmons <jsimmons@infradead.org>
Reviewed-on: https://review.whamcloud.com/38390
Tested-by: jenkins <devops@whamcloud.com>
Tested-by: Maloo <maloo@whamcloud.com>
Reviewed-by: Shaun Tancheff <shaun.tancheff@hpe.com>
Reviewed-by: Neil Brown <neilb@suse.de>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
libcfs/autoconf/lustre-libcfs.m4
libcfs/include/libcfs/linux/Makefile.am
libcfs/include/libcfs/linux/refcount.h [moved from libcfs/include/libcfs/linux/linux-refcount.h with 100% similarity]
lustre/autoconf/lustre-core.m4

index 76775ad..50c1431 100644 (file)
@@ -733,9 +733,13 @@ cpu_hotplug_state_machine, [
 # introduced refcount_t which is atomic_t plus over flow guards.
 #
 AC_DEFUN([LIBCFS_REFCOUNT_T], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
 LB_CHECK_LINUX_HEADER([linux/refcount.h], [
        AC_DEFINE(HAVE_REFCOUNT_T, 1,
-               [refcount_t is supported])])
+               [refcount_t is supported])
+])
+EXTRA_KCFLAGS="$tmp_flags"
 ]) # LIBCFS_REFCOUNT_T
 
 #
@@ -839,9 +843,13 @@ uuid_t, [
 # introduce processor.h
 #
 AC_DEFUN([LIBCFS_HAVE_PROCESSOR_HEADER], [
+tmp_flags="$EXTRA_KCFLAGS"
+EXTRA_KCFLAGS="-Werror"
 LB_CHECK_LINUX_HEADER([linux/processor.h], [
        AC_DEFINE(HAVE_PROCESSOR_H, 1,
-               [processor.h is present])])
+               [processor.h is present])
+])
+EXTRA_KCFLAGS="$tmp_flags"
 ]) # LIBCFS_HAVE_PROCESSOR_HEADER
 
 #
index 3e2c178..187d360 100644 (file)
@@ -1,3 +1,3 @@
 EXTRA_DIST = linux-misc.h linux-fs.h linux-mem.h linux-time.h linux-cpu.h \
             linux-list.h linux-hash.h linux-uuid.h linux-wait.h \
-            linux-refcount.h processor.h
+            refcount.h processor.h
index 74d9743..1a2e781 100644 (file)
@@ -2349,7 +2349,6 @@ AC_DEFUN([LC_PROG_LINUX], [
        LC___XA_SET_MARK
        LC_UAPI_LINUX_MOUNT_H
        LC_HAVE_SUNRPC_CACHE_HASH_LOCK_IS_A_SPINLOCK
-       LC_REPLACE_EXCEPTIONAL_ENTRIES
 
        # 5.1
        LC_HAS_LINUX_SELINUX_ENABLED