LINUX_D_COUNT_IS_INT
LINUX_IOP_MKDIR_TAKES_UMODE_T
LINUX_IOP_CREATE_TAKES_UMODE_T
+ LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES
dnl If we are guaranteed that keyrings will work - that is
dnl a) The kernel has keyrings enabled
static inline int
afs_get_fh_from_dentry(struct dentry *dp, afs_ufs_dcache_id_t *ainode, int *max_lenp) {
if (dp->d_sb->s_export_op->encode_fh)
+#if defined(EXPORT_OP_ENCODE_FH_TAKES_INODES)
+ return dp->d_sb->s_export_op->encode_fh(dp->d_inode, &ainode->raw[0], max_lenp, NULL);
+#else
return dp->d_sb->s_export_op->encode_fh(dp, &ainode->raw[0], max_lenp, 0);
+#endif
#if defined(NEW_EXPORT_OPS)
/* If fs doesn't provide an encode_fh method, assume the default INO32 type */
*max_lenp = sizeof(struct fid)/4;
[define if inode.i_op->create takes a umode_t argument],
[-Werror])
])
+
+
+AC_DEFUN([LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES], [
+ AC_CHECK_LINUX_BUILD([whether export operation encode_fh takes inode arguments],
+ [ac_cv_linux_export_op_encode_fh__takes_inodes],
+ [#include <linux/exportfs.h>],
+ [struct export_operations _exp_ops;
+ int _encode_fh(struct inode *i, __u32 *fh, int *len, struct inode *p)
+ {return 0;};
+ _exp_ops.encode_fh = _encode_fh;],
+ [EXPORT_OP_ENCODE_FH_TAKES_INODES],
+ [define if encode_fh export op takes inode arguments],
+ [-Werror])
+])