Linux 6.8 compat: make test functions static

The kernel is now being compiled with -Wmissing-prototypes. Most of our
test stub functions had no prototype, and failed to compile. Since they
don't need to be visible anywhere else, just make them all static.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Rob Norris <robn@despairlabs.com>
Sponsored-by: https://despairlabs.com/sponsor/
Closes #15805
This commit is contained in:
Rob Norris 2024-01-23 10:50:53 +11:00 committed by Brian Behlendorf
parent 0c11f7c96f
commit a41d0b29a9
33 changed files with 95 additions and 98 deletions

View File

@ -172,7 +172,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [ ZFS_LINUX_TEST_SRC([inode_operations_get_acl], [
#include <linux/fs.h> #include <linux/fs.h>
struct posix_acl *get_acl_fn(struct inode *inode, int type) static struct posix_acl *get_acl_fn(struct inode *inode, int type)
{ return NULL; } { return NULL; }
static const struct inode_operations static const struct inode_operations
@ -184,7 +184,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [ ZFS_LINUX_TEST_SRC([inode_operations_get_acl_rcu], [
#include <linux/fs.h> #include <linux/fs.h>
struct posix_acl *get_acl_fn(struct inode *inode, int type, static struct posix_acl *get_acl_fn(struct inode *inode, int type,
bool rcu) { return NULL; } bool rcu) { return NULL; }
static const struct inode_operations static const struct inode_operations
@ -196,7 +196,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_GET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_get_inode_acl], [ ZFS_LINUX_TEST_SRC([inode_operations_get_inode_acl], [
#include <linux/fs.h> #include <linux/fs.h>
struct posix_acl *get_inode_acl_fn(struct inode *inode, int type, static struct posix_acl *get_inode_acl_fn(struct inode *inode, int type,
bool rcu) { return NULL; } bool rcu) { return NULL; }
static const struct inode_operations static const struct inode_operations
@ -243,7 +243,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_mnt_idmap_dentry], [ ZFS_LINUX_TEST_SRC([inode_operations_set_acl_mnt_idmap_dentry], [
#include <linux/fs.h> #include <linux/fs.h>
int set_acl_fn(struct mnt_idmap *idmap, static int set_acl_fn(struct mnt_idmap *idmap,
struct dentry *dent, struct posix_acl *acl, struct dentry *dent, struct posix_acl *acl,
int type) { return 0; } int type) { return 0; }
@ -255,7 +255,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns_dentry], [ ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns_dentry], [
#include <linux/fs.h> #include <linux/fs.h>
int set_acl_fn(struct user_namespace *userns, static int set_acl_fn(struct user_namespace *userns,
struct dentry *dent, struct posix_acl *acl, struct dentry *dent, struct posix_acl *acl,
int type) { return 0; } int type) { return 0; }
@ -267,7 +267,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [ ZFS_LINUX_TEST_SRC([inode_operations_set_acl_userns], [
#include <linux/fs.h> #include <linux/fs.h>
int set_acl_fn(struct user_namespace *userns, static int set_acl_fn(struct user_namespace *userns,
struct inode *inode, struct posix_acl *acl, struct inode *inode, struct posix_acl *acl,
int type) { return 0; } int type) { return 0; }
@ -279,7 +279,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OPERATIONS_SET_ACL], [
ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [ ZFS_LINUX_TEST_SRC([inode_operations_set_acl], [
#include <linux/fs.h> #include <linux/fs.h>
int set_acl_fn(struct inode *inode, struct posix_acl *acl, static int set_acl_fn(struct inode *inode, struct posix_acl *acl,
int type) { return 0; } int type) { return 0; }
static const struct inode_operations static const struct inode_operations

View File

@ -8,7 +8,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_AUTOMOUNT], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_AUTOMOUNT], [
ZFS_LINUX_TEST_SRC([dentry_operations_d_automount], [ ZFS_LINUX_TEST_SRC([dentry_operations_d_automount], [
#include <linux/dcache.h> #include <linux/dcache.h>
struct vfsmount *d_automount(struct path *p) { return NULL; } static struct vfsmount *d_automount(struct path *p) { return NULL; }
struct dentry_operations dops __attribute__ ((unused)) = { struct dentry_operations dops __attribute__ ((unused)) = {
.d_automount = d_automount, .d_automount = d_automount,
}; };

View File

@ -247,7 +247,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_BIO_END_IO_T_ARGS], [
ZFS_LINUX_TEST_SRC([bio_end_io_t_args], [ ZFS_LINUX_TEST_SRC([bio_end_io_t_args], [
#include <linux/bio.h> #include <linux/bio.h>
void wanted_end_io(struct bio *bio) { return; } static void wanted_end_io(struct bio *bio) { return; }
bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io; bio_end_io_t *end_io __attribute__ ((unused)) = wanted_end_io;
], []) ], [])
]) ])

View File

@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_CHECK_EVENTS], [
ZFS_LINUX_TEST_SRC([block_device_operations_check_events], [ ZFS_LINUX_TEST_SRC([block_device_operations_check_events], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
unsigned int blk_check_events(struct gendisk *disk, static unsigned int blk_check_events(struct gendisk *disk,
unsigned int clearing) { unsigned int clearing) {
(void) disk, (void) clearing; (void) disk, (void) clearing;
return (0); return (0);
@ -34,7 +34,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_VOID], [
ZFS_LINUX_TEST_SRC([block_device_operations_release_void], [ ZFS_LINUX_TEST_SRC([block_device_operations_release_void], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
void blk_release(struct gendisk *g, fmode_t mode) { static void blk_release(struct gendisk *g, fmode_t mode) {
(void) g, (void) mode; (void) g, (void) mode;
return; return;
} }
@ -56,7 +56,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_RELEASE_1ARG], [
ZFS_LINUX_TEST_SRC([block_device_operations_release_void_1arg], [ ZFS_LINUX_TEST_SRC([block_device_operations_release_void_1arg], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
void blk_release(struct gendisk *g) { static void blk_release(struct gendisk *g) {
(void) g; (void) g;
return; return;
} }
@ -96,7 +96,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_BLOCK_DEVICE_OPERATIONS_REVALIDATE_DISK], [
ZFS_LINUX_TEST_SRC([block_device_operations_revalidate_disk], [ ZFS_LINUX_TEST_SRC([block_device_operations_revalidate_disk], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
int blk_revalidate_disk(struct gendisk *disk) { static int blk_revalidate_disk(struct gendisk *disk) {
(void) disk; (void) disk;
return(0); return(0);
} }

View File

@ -7,7 +7,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_COMMIT_METADATA], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_COMMIT_METADATA], [
ZFS_LINUX_TEST_SRC([export_operations_commit_metadata], [ ZFS_LINUX_TEST_SRC([export_operations_commit_metadata], [
#include <linux/exportfs.h> #include <linux/exportfs.h>
int commit_metadata(struct inode *inode) { return 0; } static int commit_metadata(struct inode *inode) { return 0; }
static struct export_operations eops __attribute__ ((unused))={ static struct export_operations eops __attribute__ ((unused))={
.commit_metadata = commit_metadata, .commit_metadata = commit_metadata,
}; };

View File

@ -98,7 +98,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_D_REVALIDATE_NAMEIDATA], [
#include <linux/dcache.h> #include <linux/dcache.h>
#include <linux/sched.h> #include <linux/sched.h>
int revalidate (struct dentry *dentry, static int revalidate (struct dentry *dentry,
struct nameidata *nidata) { return 0; } struct nameidata *nidata) { return 0; }
static const struct dentry_operations static const struct dentry_operations

View File

@ -8,7 +8,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_DIRTY_INODE], [
ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [ ZFS_LINUX_TEST_SRC([dirty_inode_with_flags], [
#include <linux/fs.h> #include <linux/fs.h>
void dirty_inode(struct inode *a, int b) { return; } static void dirty_inode(struct inode *a, int b) { return; }
static const struct super_operations static const struct super_operations
sops __attribute__ ((unused)) = { sops __attribute__ ((unused)) = {

View File

@ -7,7 +7,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_ENCODE_FH_WITH_INODE], [
ZFS_LINUX_TEST_SRC([export_operations_encode_fh], [ ZFS_LINUX_TEST_SRC([export_operations_encode_fh], [
#include <linux/exportfs.h> #include <linux/exportfs.h>
int encode_fh(struct inode *inode, __u32 *fh, int *max_len, static int encode_fh(struct inode *inode, __u32 *fh, int *max_len,
struct inode *parent) { return 0; } struct inode *parent) { return 0; }
static struct export_operations eops __attribute__ ((unused))={ static struct export_operations eops __attribute__ ((unused))={
.encode_fh = encode_fh, .encode_fh = encode_fh,

View File

@ -6,7 +6,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_EVICT_INODE], [
ZFS_LINUX_TEST_SRC([evict_inode], [ ZFS_LINUX_TEST_SRC([evict_inode], [
#include <linux/fs.h> #include <linux/fs.h>
void evict_inode (struct inode * t) { return; } static void evict_inode (struct inode * t) { return; }
static struct super_operations sops __attribute__ ((unused)) = { static struct super_operations sops __attribute__ ((unused)) = {
.evict_inode = evict_inode, .evict_inode = evict_inode,
}; };

View File

@ -11,7 +11,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FALLOCATE], [
ZFS_LINUX_TEST_SRC([file_fallocate], [ ZFS_LINUX_TEST_SRC([file_fallocate], [
#include <linux/fs.h> #include <linux/fs.h>
long test_fallocate(struct file *file, int mode, static long test_fallocate(struct file *file, int mode,
loff_t offset, loff_t len) { return 0; } loff_t offset, loff_t len) { return 0; }
static const struct file_operations static const struct file_operations

View File

@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
ZFS_LINUX_TEST_SRC([fsync_without_dentry], [ ZFS_LINUX_TEST_SRC([fsync_without_dentry], [
#include <linux/fs.h> #include <linux/fs.h>
int test_fsync(struct file *f, int x) { return 0; } static int test_fsync(struct file *f, int x) { return 0; }
static const struct file_operations static const struct file_operations
fops __attribute__ ((unused)) = { fops __attribute__ ((unused)) = {
@ -16,7 +16,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_FSYNC], [
ZFS_LINUX_TEST_SRC([fsync_range], [ ZFS_LINUX_TEST_SRC([fsync_range], [
#include <linux/fs.h> #include <linux/fs.h>
int test_fsync(struct file *f, loff_t a, loff_t b, int c) static int test_fsync(struct file *f, loff_t a, loff_t b, int c)
{ return 0; } { return 0; }
static const struct file_operations static const struct file_operations

View File

@ -5,7 +5,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
ZFS_LINUX_TEST_SRC([inode_operations_get_link], [ ZFS_LINUX_TEST_SRC([inode_operations_get_link], [
#include <linux/fs.h> #include <linux/fs.h>
const char *get_link(struct dentry *de, struct inode *ip, static const char *get_link(struct dentry *de, struct inode *ip,
struct delayed_call *done) { return "symlink"; } struct delayed_call *done) { return "symlink"; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {
@ -15,7 +15,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [ ZFS_LINUX_TEST_SRC([inode_operations_get_link_cookie], [
#include <linux/fs.h> #include <linux/fs.h>
const char *get_link(struct dentry *de, struct static const char *get_link(struct dentry *de, struct
inode *ip, void **cookie) { return "symlink"; } inode *ip, void **cookie) { return "symlink"; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [ ZFS_LINUX_TEST_SRC([inode_operations_follow_link], [
#include <linux/fs.h> #include <linux/fs.h>
const char *follow_link(struct dentry *de, static const char *follow_link(struct dentry *de,
void **cookie) { return "symlink"; } void **cookie) { return "symlink"; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {
@ -35,7 +35,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_GET_LINK], [
ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [ ZFS_LINUX_TEST_SRC([inode_operations_follow_link_nameidata], [
#include <linux/fs.h> #include <linux/fs.h>
void *follow_link(struct dentry *de, struct static void *follow_link(struct dentry *de, struct
nameidata *nd) { return (void *)NULL; } nameidata *nd) { return (void *)NULL; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {

View File

@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int inode_create(struct mnt_idmap *idmap, static int inode_create(struct mnt_idmap *idmap,
struct inode *inode ,struct dentry *dentry, struct inode *inode ,struct dentry *dentry,
umode_t umode, bool flag) { return 0; } umode_t umode, bool flag) { return 0; }
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int inode_create(struct user_namespace *userns, static int inode_create(struct user_namespace *userns,
struct inode *inode ,struct dentry *dentry, struct inode *inode ,struct dentry *dentry,
umode_t umode, bool flag) { return 0; } umode_t umode, bool flag) { return 0; }
@ -42,7 +42,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_CREATE], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int inode_create(struct inode *inode ,struct dentry *dentry, static int inode_create(struct inode *inode ,struct dentry *dentry,
umode_t umode, bool flag) { return 0; } umode_t umode, bool flag) { return 0; }
static const struct inode_operations static const struct inode_operations

View File

@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_getattr_mnt_idmap], [ ZFS_LINUX_TEST_SRC([inode_operations_getattr_mnt_idmap], [
#include <linux/fs.h> #include <linux/fs.h>
int test_getattr( static int test_getattr(
struct mnt_idmap *idmap, struct mnt_idmap *idmap,
const struct path *p, struct kstat *k, const struct path *p, struct kstat *k,
u32 request_mask, unsigned int query_flags) u32 request_mask, unsigned int query_flags)
@ -28,7 +28,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [ ZFS_LINUX_TEST_SRC([inode_operations_getattr_userns], [
#include <linux/fs.h> #include <linux/fs.h>
int test_getattr( static int test_getattr(
struct user_namespace *userns, struct user_namespace *userns,
const struct path *p, struct kstat *k, const struct path *p, struct kstat *k,
u32 request_mask, unsigned int query_flags) u32 request_mask, unsigned int query_flags)
@ -47,7 +47,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [ ZFS_LINUX_TEST_SRC([inode_operations_getattr_path], [
#include <linux/fs.h> #include <linux/fs.h>
int test_getattr( static int test_getattr(
const struct path *p, struct kstat *k, const struct path *p, struct kstat *k,
u32 request_mask, unsigned int query_flags) u32 request_mask, unsigned int query_flags)
{ return 0; } { return 0; }
@ -61,7 +61,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_GETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [ ZFS_LINUX_TEST_SRC([inode_operations_getattr_vfsmount], [
#include <linux/fs.h> #include <linux/fs.h>
int test_getattr( static int test_getattr(
struct vfsmount *mnt, struct dentry *d, struct vfsmount *mnt, struct dentry *d,
struct kstat *k) struct kstat *k)
{ return 0; } { return 0; }

View File

@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_LOOKUP_FLAGS], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
struct dentry *inode_lookup(struct inode *inode, static struct dentry *inode_lookup(struct inode *inode,
struct dentry *dentry, unsigned int flags) { return NULL; } struct dentry *dentry, unsigned int flags) { return NULL; }
static const struct inode_operations iops static const struct inode_operations iops

View File

@ -8,7 +8,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PERMISSION], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int inode_permission(struct mnt_idmap *idmap, static int inode_permission(struct mnt_idmap *idmap,
struct inode *inode, int mask) { return 0; } struct inode *inode, int mask) { return 0; }
static const struct inode_operations static const struct inode_operations
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PERMISSION], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int inode_permission(struct user_namespace *userns, static int inode_permission(struct user_namespace *userns,
struct inode *inode, int mask) { return 0; } struct inode *inode, int mask) { return 0; }
static const struct inode_operations static const struct inode_operations

View File

@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_setattr_mnt_idmap], [ ZFS_LINUX_TEST_SRC([inode_operations_setattr_mnt_idmap], [
#include <linux/fs.h> #include <linux/fs.h>
int test_setattr( static int test_setattr(
struct mnt_idmap *idmap, struct mnt_idmap *idmap,
struct dentry *de, struct iattr *ia) struct dentry *de, struct iattr *ia)
{ return 0; } { return 0; }
@ -27,7 +27,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_setattr_userns], [ ZFS_LINUX_TEST_SRC([inode_operations_setattr_userns], [
#include <linux/fs.h> #include <linux/fs.h>
int test_setattr( static int test_setattr(
struct user_namespace *userns, struct user_namespace *userns,
struct dentry *de, struct iattr *ia) struct dentry *de, struct iattr *ia)
{ return 0; } { return 0; }
@ -41,7 +41,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SETATTR], [
ZFS_LINUX_TEST_SRC([inode_operations_setattr], [ ZFS_LINUX_TEST_SRC([inode_operations_setattr], [
#include <linux/fs.h> #include <linux/fs.h>
int test_setattr( static int test_setattr(
struct dentry *de, struct iattr *ia) struct dentry *de, struct iattr *ia)
{ return 0; } { return 0; }

View File

@ -4,7 +4,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
ZFS_LINUX_TEST_SRC([make_request_fn_void], [ ZFS_LINUX_TEST_SRC([make_request_fn_void], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
void make_request(struct request_queue *q, static void make_request(struct request_queue *q,
struct bio *bio) { return; } struct bio *bio) { return; }
],[ ],[
blk_queue_make_request(NULL, &make_request); blk_queue_make_request(NULL, &make_request);
@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [ ZFS_LINUX_TEST_SRC([make_request_fn_blk_qc_t], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
blk_qc_t make_request(struct request_queue *q, static blk_qc_t make_request(struct request_queue *q,
struct bio *bio) { return (BLK_QC_T_NONE); } struct bio *bio) { return (BLK_QC_T_NONE); }
],[ ],[
blk_queue_make_request(NULL, &make_request); blk_queue_make_request(NULL, &make_request);
@ -20,7 +20,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn], [ ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
blk_qc_t make_request(struct request_queue *q, static blk_qc_t make_request(struct request_queue *q,
struct bio *bio) { return (BLK_QC_T_NONE); } struct bio *bio) { return (BLK_QC_T_NONE); }
],[ ],[
struct request_queue *q __attribute__ ((unused)); struct request_queue *q __attribute__ ((unused));
@ -29,7 +29,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MAKE_REQUEST_FN], [
ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn_rh], [ ZFS_LINUX_TEST_SRC([blk_alloc_queue_request_fn_rh], [
#include <linux/blkdev.h> #include <linux/blkdev.h>
blk_qc_t make_request(struct request_queue *q, static blk_qc_t make_request(struct request_queue *q,
struct bio *bio) { return (BLK_QC_T_NONE); } struct bio *bio) { return (BLK_QC_T_NONE); }
],[ ],[
struct request_queue *q __attribute__ ((unused)); struct request_queue *q __attribute__ ((unused));

View File

@ -9,7 +9,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
ZFS_LINUX_TEST_SRC([mkdir_mnt_idmap], [ ZFS_LINUX_TEST_SRC([mkdir_mnt_idmap], [
#include <linux/fs.h> #include <linux/fs.h>
int mkdir(struct mnt_idmap *idmap, static int mkdir(struct mnt_idmap *idmap,
struct inode *inode, struct dentry *dentry, struct inode *inode, struct dentry *dentry,
umode_t umode) { return 0; } umode_t umode) { return 0; }
static const struct inode_operations static const struct inode_operations
@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [ ZFS_LINUX_TEST_SRC([mkdir_user_namespace], [
#include <linux/fs.h> #include <linux/fs.h>
int mkdir(struct user_namespace *userns, static int mkdir(struct user_namespace *userns,
struct inode *inode, struct dentry *dentry, struct inode *inode, struct dentry *dentry,
umode_t umode) { return 0; } umode_t umode) { return 0; }
@ -47,7 +47,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKDIR], [
ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [ ZFS_LINUX_TEST_SRC([inode_operations_mkdir], [
#include <linux/fs.h> #include <linux/fs.h>
int mkdir(struct inode *inode, struct dentry *dentry, static int mkdir(struct inode *inode, struct dentry *dentry,
umode_t umode) { return 0; } umode_t umode) { return 0; }
static const struct inode_operations static const struct inode_operations

View File

@ -7,7 +7,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int tmp_mknod(struct mnt_idmap *idmap, static int tmp_mknod(struct mnt_idmap *idmap,
struct inode *inode ,struct dentry *dentry, struct inode *inode ,struct dentry *dentry,
umode_t u, dev_t d) { return 0; } umode_t u, dev_t d) { return 0; }
@ -25,7 +25,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_MKNOD], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int tmp_mknod(struct user_namespace *userns, static int tmp_mknod(struct user_namespace *userns,
struct inode *inode ,struct dentry *dentry, struct inode *inode ,struct dentry *dentry,
umode_t u, dev_t d) { return 0; } umode_t u, dev_t d) { return 0; }

View File

@ -7,14 +7,14 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PROC_OPERATIONS], [
ZFS_LINUX_TEST_SRC([proc_ops_struct], [ ZFS_LINUX_TEST_SRC([proc_ops_struct], [
#include <linux/proc_fs.h> #include <linux/proc_fs.h>
int test_open(struct inode *ip, struct file *fp) { return 0; } static int test_open(struct inode *ip, struct file *fp) { return 0; }
ssize_t test_read(struct file *fp, char __user *ptr, static ssize_t test_read(struct file *fp, char __user *ptr,
size_t size, loff_t *offp) { return 0; } size_t size, loff_t *offp) { return 0; }
ssize_t test_write(struct file *fp, const char __user *ptr, static ssize_t test_write(struct file *fp, const char __user *ptr,
size_t size, loff_t *offp) { return 0; } size_t size, loff_t *offp) { return 0; }
loff_t test_lseek(struct file *fp, loff_t off, int flag) static loff_t test_lseek(struct file *fp, loff_t off, int flag)
{ return 0; } { return 0; }
int test_release(struct inode *ip, struct file *fp) static int test_release(struct inode *ip, struct file *fp)
{ return 0; } { return 0; }
const struct proc_ops test_ops __attribute__ ((unused)) = { const struct proc_ops test_ops __attribute__ ((unused)) = {

View File

@ -4,7 +4,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
ZFS_LINUX_TEST_SRC([put_link_cookie], [ ZFS_LINUX_TEST_SRC([put_link_cookie], [
#include <linux/fs.h> #include <linux/fs.h>
void put_link(struct inode *ip, void *cookie) static void put_link(struct inode *ip, void *cookie)
{ return; } { return; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {
@ -14,7 +14,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_PUT_LINK], [
ZFS_LINUX_TEST_SRC([put_link_nameidata], [ ZFS_LINUX_TEST_SRC([put_link_nameidata], [
#include <linux/fs.h> #include <linux/fs.h>
void put_link(struct dentry *de, struct static void put_link(struct dentry *de, struct
nameidata *nd, void *ptr) { return; } nameidata *nd, void *ptr) { return; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {

View File

@ -8,7 +8,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_rename2], [ ZFS_LINUX_TEST_SRC([inode_operations_rename2], [
#include <linux/fs.h> #include <linux/fs.h>
int rename2_fn(struct inode *sip, struct dentry *sdp, static int rename2_fn(struct inode *sip, struct dentry *sdp,
struct inode *tip, struct dentry *tdp, struct inode *tip, struct dentry *tdp,
unsigned int flags) { return 0; } unsigned int flags) { return 0; }
@ -26,7 +26,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [ ZFS_LINUX_TEST_SRC([inode_operations_rename_flags], [
#include <linux/fs.h> #include <linux/fs.h>
int rename_fn(struct inode *sip, struct dentry *sdp, static int rename_fn(struct inode *sip, struct dentry *sdp,
struct inode *tip, struct dentry *tdp, struct inode *tip, struct dentry *tdp,
unsigned int flags) { return 0; } unsigned int flags) { return 0; }
@ -44,7 +44,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([dir_inode_operations_wrapper_rename2], [ ZFS_LINUX_TEST_SRC([dir_inode_operations_wrapper_rename2], [
#include <linux/fs.h> #include <linux/fs.h>
int rename2_fn(struct inode *sip, struct dentry *sdp, static int rename2_fn(struct inode *sip, struct dentry *sdp,
struct inode *tip, struct dentry *tdp, struct inode *tip, struct dentry *tdp,
unsigned int flags) { return 0; } unsigned int flags) { return 0; }
@ -62,7 +62,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [ ZFS_LINUX_TEST_SRC([inode_operations_rename_userns], [
#include <linux/fs.h> #include <linux/fs.h>
int rename_fn(struct user_namespace *user_ns, struct inode *sip, static int rename_fn(struct user_namespace *user_ns, struct inode *sip,
struct dentry *sdp, struct inode *tip, struct dentry *tdp, struct dentry *sdp, struct inode *tip, struct dentry *tdp,
unsigned int flags) { return 0; } unsigned int flags) { return 0; }
@ -77,7 +77,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_RENAME], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_rename_mnt_idmap], [ ZFS_LINUX_TEST_SRC([inode_operations_rename_mnt_idmap], [
#include <linux/fs.h> #include <linux/fs.h>
int rename_fn(struct mnt_idmap *idmap, struct inode *sip, static int rename_fn(struct mnt_idmap *idmap, struct inode *sip,
struct dentry *sdp, struct inode *tip, struct dentry *tdp, struct dentry *sdp, struct inode *tip, struct dentry *tdp,
unsigned int flags) { return 0; } unsigned int flags) { return 0; }

View File

@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHOW_OPTIONS], [
ZFS_LINUX_TEST_SRC([super_operations_show_options], [ ZFS_LINUX_TEST_SRC([super_operations_show_options], [
#include <linux/fs.h> #include <linux/fs.h>
int show_options(struct seq_file * x, struct dentry * y) { static int show_options(struct seq_file * x, struct dentry * y) {
return 0; return 0;
}; };

View File

@ -8,9 +8,6 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK], [
ZFS_LINUX_TEST_SRC([super_block_s_shrink], [ ZFS_LINUX_TEST_SRC([super_block_s_shrink], [
#include <linux/fs.h> #include <linux/fs.h>
int shrink(struct shrinker *s, struct shrink_control *sc)
{ return 0; }
static const struct super_block static const struct super_block
sb __attribute__ ((unused)) = { sb __attribute__ ((unused)) = {
.s_shrink.seeks = DEFAULT_SEEKS, .s_shrink.seeks = DEFAULT_SEEKS,
@ -26,7 +23,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_SUPER_BLOCK_S_SHRINK_PTR], [
ZFS_LINUX_TEST_SRC([super_block_s_shrink_ptr], [ ZFS_LINUX_TEST_SRC([super_block_s_shrink_ptr], [
#include <linux/fs.h> #include <linux/fs.h>
unsigned long shrinker_cb(struct shrinker *shrink, static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; } struct shrink_control *sc) { return 0; }
static struct shrinker shrinker = { static struct shrinker shrinker = {
.count_objects = shrinker_cb, .count_objects = shrinker_cb,
@ -89,7 +86,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SHRINK_CONTROL_HAS_NID], [
AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
ZFS_LINUX_TEST_SRC([register_shrinker_vararg], [ ZFS_LINUX_TEST_SRC([register_shrinker_vararg], [
#include <linux/mm.h> #include <linux/mm.h>
unsigned long shrinker_cb(struct shrinker *shrink, static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; } struct shrink_control *sc) { return 0; }
],[ ],[
struct shrinker cache_shrinker = { struct shrinker cache_shrinker = {
@ -104,7 +101,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_REGISTER_SHRINKER_VARARG], [
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control], [ ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control], [
#include <linux/mm.h> #include <linux/mm.h>
int shrinker_cb(struct shrinker *shrink, static int shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; } struct shrink_control *sc) { return 0; }
],[ ],[
struct shrinker cache_shrinker = { struct shrinker cache_shrinker = {
@ -116,7 +113,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_CALLBACK], [
ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control_split], [ ZFS_LINUX_TEST_SRC([shrinker_cb_shrink_control_split], [
#include <linux/mm.h> #include <linux/mm.h>
unsigned long shrinker_cb(struct shrinker *shrink, static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; } struct shrink_control *sc) { return 0; }
],[ ],[
struct shrinker cache_shrinker = { struct shrinker cache_shrinker = {
@ -135,7 +132,7 @@ dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_SHRINKER_REGISTER], [
ZFS_LINUX_TEST_SRC([shrinker_register], [ ZFS_LINUX_TEST_SRC([shrinker_register], [
#include <linux/shrinker.h> #include <linux/shrinker.h>
unsigned long shrinker_cb(struct shrinker *shrink, static unsigned long shrinker_cb(struct shrinker *shrink,
struct shrink_control *sc) { return 0; } struct shrink_control *sc) { return 0; }
],[ ],[
struct shrinker cache_shrinker = { struct shrinker cache_shrinker = {

View File

@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [
ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [ ZFS_LINUX_TEST_SRC([symlink_mnt_idmap], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int tmp_symlink(struct mnt_idmap *idmap, static int tmp_symlink(struct mnt_idmap *idmap,
struct inode *inode ,struct dentry *dentry, struct inode *inode ,struct dentry *dentry,
const char *path) { return 0; } const char *path) { return 0; }
@ -23,7 +23,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_SYMLINK], [
#include <linux/fs.h> #include <linux/fs.h>
#include <linux/sched.h> #include <linux/sched.h>
int tmp_symlink(struct user_namespace *userns, static int tmp_symlink(struct user_namespace *userns,
struct inode *inode ,struct dentry *dentry, struct inode *inode ,struct dentry *dentry,
const char *path) { return 0; } const char *path) { return 0; }

View File

@ -18,7 +18,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
int data; int data;
}; };
void task_expire(struct timer_list *tl) static void task_expire(struct timer_list *tl)
{ {
struct my_task_timer *task_timer = struct my_task_timer *task_timer =
from_timer(task_timer, tl, timer); from_timer(task_timer, tl, timer);
@ -31,7 +31,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TIMER_SETUP], [
ZFS_LINUX_TEST_SRC([timer_list_function], [ ZFS_LINUX_TEST_SRC([timer_list_function], [
#include <linux/timer.h> #include <linux/timer.h>
void task_expire(struct timer_list *tl) {} static void task_expire(struct timer_list *tl) {}
],[ ],[
struct timer_list tl; struct timer_list tl;
tl.function = task_expire; tl.function = task_expire;

View File

@ -9,7 +9,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_mnt_idmap], [ ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_mnt_idmap], [
#include <linux/fs.h> #include <linux/fs.h>
int tmpfile(struct mnt_idmap *idmap, static int tmpfile(struct mnt_idmap *idmap,
struct inode *inode, struct file *file, struct inode *inode, struct file *file,
umode_t mode) { return 0; } umode_t mode) { return 0; }
static struct inode_operations static struct inode_operations
@ -22,7 +22,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [ ZFS_LINUX_TEST_SRC([inode_operations_tmpfile], [
#include <linux/fs.h> #include <linux/fs.h>
int tmpfile(struct user_namespace *userns, static int tmpfile(struct user_namespace *userns,
struct inode *inode, struct file *file, struct inode *inode, struct file *file,
umode_t mode) { return 0; } umode_t mode) { return 0; }
static struct inode_operations static struct inode_operations
@ -36,7 +36,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [ ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry_userns], [
#include <linux/fs.h> #include <linux/fs.h>
int tmpfile(struct user_namespace *userns, static int tmpfile(struct user_namespace *userns,
struct inode *inode, struct dentry *dentry, struct inode *inode, struct dentry *dentry,
umode_t mode) { return 0; } umode_t mode) { return 0; }
static struct inode_operations static struct inode_operations
@ -46,7 +46,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_TMPFILE], [
],[]) ],[])
ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [ ZFS_LINUX_TEST_SRC([inode_operations_tmpfile_dentry], [
#include <linux/fs.h> #include <linux/fs.h>
int tmpfile(struct inode *inode, struct dentry *dentry, static int tmpfile(struct inode *inode, struct dentry *dentry,
umode_t mode) { return 0; } umode_t mode) { return 0; }
static struct inode_operations static struct inode_operations
iops __attribute__ ((unused)) = { iops __attribute__ ((unused)) = {

View File

@ -5,7 +5,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
ZFS_LINUX_TEST_SRC([direct_io_iter], [ ZFS_LINUX_TEST_SRC([direct_io_iter], [
#include <linux/fs.h> #include <linux/fs.h>
ssize_t test_direct_IO(struct kiocb *kiocb, static ssize_t test_direct_IO(struct kiocb *kiocb,
struct iov_iter *iter) { return 0; } struct iov_iter *iter) { return 0; }
static const struct address_space_operations static const struct address_space_operations
@ -17,7 +17,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [ ZFS_LINUX_TEST_SRC([direct_io_iter_offset], [
#include <linux/fs.h> #include <linux/fs.h>
ssize_t test_direct_IO(struct kiocb *kiocb, static ssize_t test_direct_IO(struct kiocb *kiocb,
struct iov_iter *iter, loff_t offset) { return 0; } struct iov_iter *iter, loff_t offset) { return 0; }
static const struct address_space_operations static const struct address_space_operations
@ -29,7 +29,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
ZFS_LINUX_TEST_SRC([direct_io_iter_rw_offset], [ ZFS_LINUX_TEST_SRC([direct_io_iter_rw_offset], [
#include <linux/fs.h> #include <linux/fs.h>
ssize_t test_direct_IO(int rw, struct kiocb *kiocb, static ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
struct iov_iter *iter, loff_t offset) { return 0; } struct iov_iter *iter, loff_t offset) { return 0; }
static const struct address_space_operations static const struct address_space_operations
@ -41,7 +41,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_DIRECT_IO], [
ZFS_LINUX_TEST_SRC([direct_io_iovec], [ ZFS_LINUX_TEST_SRC([direct_io_iovec], [
#include <linux/fs.h> #include <linux/fs.h>
ssize_t test_direct_IO(int rw, struct kiocb *kiocb, static ssize_t test_direct_IO(int rw, struct kiocb *kiocb,
const struct iovec *iov, loff_t offset, const struct iovec *iov, loff_t offset,
unsigned long nr_segs) { return 0; } unsigned long nr_segs) { return 0; }

View File

@ -1,7 +1,7 @@
AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
ZFS_LINUX_TEST_SRC([file_operations_iterate_shared], [ ZFS_LINUX_TEST_SRC([file_operations_iterate_shared], [
#include <linux/fs.h> #include <linux/fs.h>
int iterate(struct file *filp, struct dir_context * context) static int iterate(struct file *filp, struct dir_context * context)
{ return 0; } { return 0; }
static const struct file_operations fops static const struct file_operations fops
@ -12,7 +12,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
ZFS_LINUX_TEST_SRC([file_operations_iterate], [ ZFS_LINUX_TEST_SRC([file_operations_iterate], [
#include <linux/fs.h> #include <linux/fs.h>
int iterate(struct file *filp, static int iterate(struct file *filp,
struct dir_context *context) { return 0; } struct dir_context *context) { return 0; }
static const struct file_operations fops static const struct file_operations fops
@ -27,7 +27,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_ITERATE], [
ZFS_LINUX_TEST_SRC([file_operations_readdir], [ ZFS_LINUX_TEST_SRC([file_operations_readdir], [
#include <linux/fs.h> #include <linux/fs.h>
int readdir(struct file *filp, void *entry, static int readdir(struct file *filp, void *entry,
filldir_t func) { return 0; } filldir_t func) { return 0; }
static const struct file_operations fops static const struct file_operations fops

View File

@ -5,9 +5,9 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_VFS_RW_ITERATE], [
ZFS_LINUX_TEST_SRC([file_operations_rw], [ ZFS_LINUX_TEST_SRC([file_operations_rw], [
#include <linux/fs.h> #include <linux/fs.h>
ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to) static ssize_t test_read(struct kiocb *kiocb, struct iov_iter *to)
{ return 0; } { return 0; }
ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from) static ssize_t test_write(struct kiocb *kiocb, struct iov_iter *from)
{ return 0; } { return 0; }
static const struct file_operations static const struct file_operations

View File

@ -6,7 +6,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_WRITEPAGE_T], [
dnl # dnl #
ZFS_LINUX_TEST_SRC([writepage_t_folio], [ ZFS_LINUX_TEST_SRC([writepage_t_folio], [
#include <linux/writeback.h> #include <linux/writeback.h>
int putpage(struct folio *folio, static int putpage(struct folio *folio,
struct writeback_control *wbc, void *data) struct writeback_control *wbc, void *data)
{ return 0; } { return 0; }
writepage_t func = putpage; writepage_t func = putpage;

View File

@ -68,7 +68,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode], [ ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode], [
#include <linux/xattr.h> #include <linux/xattr.h>
int get(const struct xattr_handler *handler, static int get(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode, struct dentry *dentry, struct inode *inode,
const char *name, void *buffer, size_t size) { return 0; } const char *name, void *buffer, size_t size) { return 0; }
static const struct xattr_handler static const struct xattr_handler
@ -80,7 +80,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
ZFS_LINUX_TEST_SRC([xattr_handler_get_xattr_handler], [ ZFS_LINUX_TEST_SRC([xattr_handler_get_xattr_handler], [
#include <linux/xattr.h> #include <linux/xattr.h>
int get(const struct xattr_handler *handler, static int get(const struct xattr_handler *handler,
struct dentry *dentry, const char *name, struct dentry *dentry, const char *name,
void *buffer, size_t size) { return 0; } void *buffer, size_t size) { return 0; }
static const struct xattr_handler static const struct xattr_handler
@ -92,7 +92,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry], [ ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry], [
#include <linux/xattr.h> #include <linux/xattr.h>
int get(struct dentry *dentry, const char *name, static int get(struct dentry *dentry, const char *name,
void *buffer, size_t size, int handler_flags) void *buffer, size_t size, int handler_flags)
{ return 0; } { return 0; }
static const struct xattr_handler static const struct xattr_handler
@ -104,7 +104,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_GET], [
ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [ ZFS_LINUX_TEST_SRC([xattr_handler_get_dentry_inode_flags], [
#include <linux/xattr.h> #include <linux/xattr.h>
int get(const struct xattr_handler *handler, static int get(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode, struct dentry *dentry, struct inode *inode,
const char *name, void *buffer, const char *name, void *buffer,
size_t size, int flags) { return 0; } size_t size, int flags) { return 0; }
@ -182,7 +182,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
ZFS_LINUX_TEST_SRC([xattr_handler_set_mnt_idmap], [ ZFS_LINUX_TEST_SRC([xattr_handler_set_mnt_idmap], [
#include <linux/xattr.h> #include <linux/xattr.h>
int set(const struct xattr_handler *handler, static int set(const struct xattr_handler *handler,
struct mnt_idmap *idmap, struct mnt_idmap *idmap,
struct dentry *dentry, struct inode *inode, struct dentry *dentry, struct inode *inode,
const char *name, const void *buffer, const char *name, const void *buffer,
@ -197,7 +197,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
ZFS_LINUX_TEST_SRC([xattr_handler_set_userns], [ ZFS_LINUX_TEST_SRC([xattr_handler_set_userns], [
#include <linux/xattr.h> #include <linux/xattr.h>
int set(const struct xattr_handler *handler, static int set(const struct xattr_handler *handler,
struct user_namespace *mnt_userns, struct user_namespace *mnt_userns,
struct dentry *dentry, struct inode *inode, struct dentry *dentry, struct inode *inode,
const char *name, const void *buffer, const char *name, const void *buffer,
@ -212,7 +212,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry_inode], [ ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry_inode], [
#include <linux/xattr.h> #include <linux/xattr.h>
int set(const struct xattr_handler *handler, static int set(const struct xattr_handler *handler,
struct dentry *dentry, struct inode *inode, struct dentry *dentry, struct inode *inode,
const char *name, const void *buffer, const char *name, const void *buffer,
size_t size, int flags) size_t size, int flags)
@ -226,7 +226,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
ZFS_LINUX_TEST_SRC([xattr_handler_set_xattr_handler], [ ZFS_LINUX_TEST_SRC([xattr_handler_set_xattr_handler], [
#include <linux/xattr.h> #include <linux/xattr.h>
int set(const struct xattr_handler *handler, static int set(const struct xattr_handler *handler,
struct dentry *dentry, const char *name, struct dentry *dentry, const char *name,
const void *buffer, size_t size, int flags) const void *buffer, size_t size, int flags)
{ return 0; } { return 0; }
@ -239,7 +239,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_SET], [
ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry], [ ZFS_LINUX_TEST_SRC([xattr_handler_set_dentry], [
#include <linux/xattr.h> #include <linux/xattr.h>
int set(struct dentry *dentry, const char *name, static int set(struct dentry *dentry, const char *name,
const void *buffer, size_t size, int flags, const void *buffer, size_t size, int flags,
int handler_flags) { return 0; } int handler_flags) { return 0; }
static const struct xattr_handler static const struct xattr_handler
@ -325,7 +325,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
ZFS_LINUX_TEST_SRC([xattr_handler_list_simple], [ ZFS_LINUX_TEST_SRC([xattr_handler_list_simple], [
#include <linux/xattr.h> #include <linux/xattr.h>
bool list(struct dentry *dentry) { return 0; } static bool list(struct dentry *dentry) { return 0; }
static const struct xattr_handler static const struct xattr_handler
xops __attribute__ ((unused)) = { xops __attribute__ ((unused)) = {
.list = list, .list = list,
@ -335,7 +335,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
ZFS_LINUX_TEST_SRC([xattr_handler_list_xattr_handler], [ ZFS_LINUX_TEST_SRC([xattr_handler_list_xattr_handler], [
#include <linux/xattr.h> #include <linux/xattr.h>
size_t list(const struct xattr_handler *handler, static size_t list(const struct xattr_handler *handler,
struct dentry *dentry, char *list, size_t list_size, struct dentry *dentry, char *list, size_t list_size,
const char *name, size_t name_len) { return 0; } const char *name, size_t name_len) { return 0; }
static const struct xattr_handler static const struct xattr_handler
@ -347,7 +347,7 @@ AC_DEFUN([ZFS_AC_KERNEL_SRC_XATTR_HANDLER_LIST], [
ZFS_LINUX_TEST_SRC([xattr_handler_list_dentry], [ ZFS_LINUX_TEST_SRC([xattr_handler_list_dentry], [
#include <linux/xattr.h> #include <linux/xattr.h>
size_t list(struct dentry *dentry, static size_t list(struct dentry *dentry,
char *list, size_t list_size, char *list, size_t list_size,
const char *name, size_t name_len, const char *name, size_t name_len,
int handler_flags) { return 0; } int handler_flags) { return 0; }