]> git.proxmox.com Git - mirror_zfs.git/blame - config/kernel-mkdir-umode-t.m4
Fix zdb crash
[mirror_zfs.git] / config / kernel-mkdir-umode-t.m4
CommitLineData
b39d3b9f
BB
1dnl #
2dnl # 3.3 API change
3dnl # The VFS .create, .mkdir and .mknod callbacks were updated to take a
4dnl # umode_t type rather than an int. The expectation is that any backport
5dnl # would also change all three prototypes. However, if it turns out that
6dnl # some distribution doesn't backport the whole thing this could be
4e33ba4c 7dnl # broken apart in to three separate checks.
b39d3b9f 8dnl #
95f5c63b 9AC_DEFUN([ZFS_AC_KERNEL_MKDIR_UMODE_T], [
b39d3b9f
BB
10 AC_MSG_CHECKING([whether iops->create()/mkdir()/mknod() take umode_t])
11 ZFS_LINUX_TRY_COMPILE([
12 #include <linux/fs.h>
c38367c7
RY
13
14 int mkdir(struct inode *inode, struct dentry *dentry,
15 umode_t umode) { return 0; }
16
17 static const struct inode_operations
18 iops __attribute__ ((unused)) = {
95f5c63b 19 .mkdir = mkdir,
b39d3b9f 20 };
c38367c7 21 ],[
b39d3b9f
BB
22 ],[
23 AC_MSG_RESULT(yes)
95f5c63b 24 AC_DEFINE(HAVE_MKDIR_UMODE_T, 1,
b39d3b9f
BB
25 [iops->create()/mkdir()/mknod() take umode_t])
26 ],[
27 AC_MSG_RESULT(no)
28 ])
29])