Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Various Linux kABI cosmetics #12103

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions config/kernel-blk-queue.m4
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,8 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_PLUG], [
])

dnl #
dnl # 2.6.32 - 4.11, statically allocated bdi in request_queue
dnl # 4.12 - x.y, dynamically allocated bdi in request_queue
dnl # 2.6.32 - 4.11: statically allocated bdi in request_queue
dnl # 4.12: dynamically allocated bdi in request_queue
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_BDI], [
ZFS_LINUX_TEST_SRC([blk_queue_bdi], [
Expand All @@ -48,7 +48,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_BDI], [
])

dnl #
dnl # 2.6.32 - 4.x API,
dnl # 2.6.32 API,
dnl # blk_queue_discard()
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_BLK_QUEUE_DISCARD], [
Expand All @@ -71,7 +71,7 @@ AC_DEFUN([ZFS_AC_KERNEL_BLK_QUEUE_DISCARD], [
])

dnl #
dnl # 4.8 - 4.x API,
dnl # 4.8 API,
dnl # blk_queue_secure_erase()
dnl #
dnl # 2.6.36 - 4.7 API,
Expand Down
4 changes: 4 additions & 0 deletions config/kernel-is_owner_or_cap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ dnl # The is_owner_or_cap() macro was renamed to inode_owner_or_capable(),
dnl # This is used for permission checks in the xattr and file attribute call
dnl # paths.
dnl #
dnl # 5.12 API change,
dnl # inode_owner_or_capable() now takes struct user_namespace *
dnl # to support idmapped mounts
dnl #
AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_OWNER_OR_CAPABLE], [
ZFS_LINUX_TEST_SRC([inode_owner_or_capable], [
#include <linux/fs.h>
Expand Down
14 changes: 7 additions & 7 deletions include/os/linux/kernel/linux/blkdev_compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ blk_queue_flag_clear(unsigned int flag, struct request_queue *q)
#endif

/*
* 4.7 - 4.x API,
* 4.7 API,
* The blk_queue_write_cache() interface has replaced blk_queue_flush()
* interface. However, the new interface is GPL-only thus we implement
* our own trivial wrapper when the GPL-only version is detected.
Expand Down Expand Up @@ -254,7 +254,7 @@ bio_set_bi_error(struct bio *bio, int error)
#endif /* HAVE_1ARG_BIO_END_IO_T */

/*
* 4.1 - x.y.z API,
* 4.1 API,
* 3.10.0 CentOS 7.x API,
* blkdev_reread_part()
*
Expand Down Expand Up @@ -391,7 +391,7 @@ bio_set_flush(struct bio *bio)
}

/*
* 4.8 - 4.x API,
* 4.8 API,
* REQ_OP_FLUSH
*
* 4.8-rc0 - 4.8-rc1,
Expand Down Expand Up @@ -421,7 +421,7 @@ bio_is_flush(struct bio *bio)
}

/*
* 4.8 - 4.x API,
* 4.8 API,
* REQ_FUA flag moved to bio->bi_opf
*
* 2.6.x - 4.7 API,
Expand All @@ -440,7 +440,7 @@ bio_is_fua(struct bio *bio)
}

/*
* 4.8 - 4.x API,
* 4.8 API,
* REQ_OP_DISCARD
*
* 2.6.36 - 4.7 API,
Expand All @@ -462,7 +462,7 @@ bio_is_discard(struct bio *bio)
}

/*
* 4.8 - 4.x API,
* 4.8 API,
* REQ_OP_SECURE_ERASE
*
* 2.6.36 - 4.7 API,
Expand Down Expand Up @@ -492,7 +492,7 @@ blk_queue_discard_granularity(struct request_queue *q, unsigned int dg)
}

/*
* 4.8 - 4.x API,
* 4.8 API,
* blk_queue_secure_erase()
*
* 2.6.36 - 4.7 API,
Expand Down
4 changes: 3 additions & 1 deletion module/os/linux/spl/spl-generic.c
Original file line number Diff line number Diff line change
Expand Up @@ -586,8 +586,10 @@ spl_getattr(struct file *filp, struct kstat *stat)
AT_STATX_SYNC_AS_STAT);
#elif defined(HAVE_2ARGS_VFS_GETATTR)
rc = vfs_getattr(&filp->f_path, stat);
#else
#elif defined(HAVE_3ARGS_VFS_GETATTR)
rc = vfs_getattr(filp->f_path.mnt, filp->f_dentry, stat);
#else
#error "No available vfs_getattr()"
#endif
if (rc)
return (-rc);
Expand Down
4 changes: 3 additions & 1 deletion module/os/linux/zfs/zfs_file_os.c
Original file line number Diff line number Diff line change
Expand Up @@ -279,8 +279,10 @@ zfs_file_getattr(zfs_file_t *filp, zfs_file_attr_t *zfattr)
AT_STATX_SYNC_AS_STAT);
#elif defined(HAVE_2ARGS_VFS_GETATTR)
rc = vfs_getattr(&filp->f_path, &stat);
#else
#elif defined(HAVE_3ARGS_VFS_GETATTR)
rc = vfs_getattr(filp->f_path.mnt, filp->f_dentry, &stat);
#else
#error "No available vfs_getattr()"
#endif
if (rc)
return (-rc);
Expand Down
2 changes: 1 addition & 1 deletion module/os/linux/zfs/zpl_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ zpl_aio_fsync(struct kiocb *kiocb, int datasync)

#elif defined(HAVE_FSYNC_RANGE)
/*
* Linux 3.1 - 3.x API,
* Linux 3.1 API,
* As of 3.1 the responsibility to call filemap_write_and_wait_range() has
* been pushed down in to the .fsync() vfs hook. Additionally, the i_mutex
* lock is no longer held by the caller, for zfs we don't require the lock
Expand Down