Explicitly include SPL compat headers

Inclusion of SPL compatibility headers was moved out of the public
header sys/types.h to avoid conflicts with external packages.  Include a
few compatiblity headers explicitly to cope with that change.  Also,
sort some linux-specific inclusions alphabetically.

Signed-off-by: Ned Bass <bass6@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #2898
This commit is contained in:
Ned Bass 2014-11-14 10:21:53 -08:00 committed by Brian Behlendorf
parent 7b2d78a046
commit aaed7c408c
8 changed files with 12 additions and 4 deletions

View File

@ -26,14 +26,15 @@
#define _SYS_ZPL_H
#include <sys/vfs.h>
#include <linux/vfs_compat.h>
#include <linux/xattr_compat.h>
#include <linux/aio.h>
#include <linux/dcache_compat.h>
#include <linux/exportfs.h>
#include <linux/writeback.h>
#include <linux/falloc.h>
#include <linux/file_compat.h>
#include <linux/task_io_accounting_ops.h>
#include <linux/aio.h>
#include <linux/vfs_compat.h>
#include <linux/writeback.h>
#include <linux/xattr_compat.h>
/* zpl_inode.c */
extern void zpl_vap_init(vattr_t *vap, struct inode *dir,

View File

@ -1030,6 +1030,7 @@ done:
}
#if defined(_KERNEL) && defined(HAVE_SPL)
#include <linux/module_compat.h>
static int avl_init(void) { return 0; }
static int avl_fini(void) { return 0; }

View File

@ -3293,6 +3293,7 @@ nvs_xdr(nvstream_t *nvs, nvlist_t *nvl, char *buf, size_t *buflen)
}
#if defined(_KERNEL) && defined(HAVE_SPL)
#include <linux/module_compat.h>
static int nvpair_init(void) { return 0; }
static int nvpair_fini(void) { return 0; }

View File

@ -2133,6 +2133,7 @@ u8_textprep_str(char *inarray, size_t *inlen, char *outarray, size_t *outlen,
}
#if defined(_KERNEL) && defined(HAVE_SPL)
#include <linux/module_compat.h>
static int unicode_init(void) { return 0; }
static int unicode_fini(void) { return 0; }

View File

@ -678,6 +678,7 @@ zfs_prop_align_right(zfs_prop_t prop)
#endif
#if defined(_KERNEL) && defined(HAVE_SPL)
#include <linux/module_compat.h>
static int zcommon_init(void) { return 0; }
static int zcommon_fini(void) { return 0; }

View File

@ -140,6 +140,7 @@
#include <vm/anon.h>
#include <sys/fs/swapnode.h>
#include <sys/zpl.h>
#include <linux/mm_compat.h>
#endif
#include <sys/callb.h>
#include <sys/kstat.h>

View File

@ -186,6 +186,7 @@
#include <sys/zfeature.h>
#include <linux/miscdevice.h>
#include <linux/module_compat.h>
#include "zfs_namecheck.h"
#include "zfs_prop.h"

View File

@ -36,6 +36,7 @@
#include <sys/txg.h>
#include <sys/dsl_destroy.h>
#include <linux/miscdevice.h>
#include <linux/module_compat.h>
#include "zpios-internal.h"