Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
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
  • Loading branch information
nedbass authored and behlendorf committed Nov 19, 2014
1 parent 7b2d78a commit aaed7c4
Show file tree
Hide file tree
Showing 8 changed files with 12 additions and 4 deletions.
9 changes: 5 additions & 4 deletions include/sys/zpl.h
Expand Up @@ -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,
Expand Down
1 change: 1 addition & 0 deletions module/avl/avl.c
Expand Up @@ -1030,6 +1030,7 @@ avl_destroy_nodes(avl_tree_t *tree, void **cookie)
}

#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; }
Expand Down
1 change: 1 addition & 0 deletions module/nvpair/nvpair.c
Expand Up @@ -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; }
Expand Down
1 change: 1 addition & 0 deletions module/unicode/u8_textprep.c
Expand Up @@ -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; }
Expand Down
1 change: 1 addition & 0 deletions module/zcommon/zfs_prop.c
Expand Up @@ -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; }
Expand Down
1 change: 1 addition & 0 deletions module/zfs/arc.c
Expand Up @@ -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>
Expand Down
1 change: 1 addition & 0 deletions module/zfs/zfs_ioctl.c
Expand Up @@ -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"
Expand Down
1 change: 1 addition & 0 deletions module/zpios/pios.c
Expand Up @@ -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"


Expand Down

0 comments on commit aaed7c4

Please sign in to comment.