From 9464b9591ea5cd61a4d6ef8e29c4597b48d16a77 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Wed, 2 May 2018 15:01:24 -0700 Subject: RHEL 7.5 compat: FMODE_KABI_ITERATE As of RHEL 7.5 the mainline fops.iterate() method was added to the file_operations structure and is correctly detected by the configure script. Normally this is what we want, but in order to maintain KABI compatibility the RHEL change additionally does the following: * Requires that callers intending to use this extended interface set the FMODE_KABI_ITERATE flag on the file structure when opening the directory. * Adds the fops.iterate() method to the end of the structure, without removing fops.readdir(). This change updates the configure check to ignore the RHEL 7.5+ variant of fops.iterate() when detected. Instead fallback to the fops.readdir() interface which will be available. Finally, add the 'zpl_' prefix to the directory context wrappers to avoid colliding with the kernel provided symbols when both the fops.iterate() and fops.readdir() are provided by the kernel. Reviewed-by: Olaf Faaland Reviewed-by: Tony Hutter Signed-off-by: Brian Behlendorf Closes #7460 Closes #7463 --- include/sys/zfs_vnops.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'include/sys/zfs_vnops.h') diff --git a/include/sys/zfs_vnops.h b/include/sys/zfs_vnops.h index f2f4d13f4..767cba10d 100644 --- a/include/sys/zfs_vnops.h +++ b/include/sys/zfs_vnops.h @@ -54,7 +54,7 @@ extern int zfs_mkdir(struct inode *dip, char *dirname, vattr_t *vap, struct inode **ipp, cred_t *cr, int flags, vsecattr_t *vsecp); extern int zfs_rmdir(struct inode *dip, char *name, struct inode *cwd, cred_t *cr, int flags); -extern int zfs_readdir(struct inode *ip, struct dir_context *ctx, cred_t *cr); +extern int zfs_readdir(struct inode *ip, zpl_dir_context_t *ctx, cred_t *cr); extern int zfs_fsync(struct inode *ip, int syncflag, cred_t *cr); extern int zfs_getattr(struct inode *ip, vattr_t *vap, int flag, cred_t *cr); extern int zfs_getattr_fast(struct inode *ip, struct kstat *sp); -- cgit v1.2.3