diff options
author | Brian Behlendorf <[email protected]> | 2012-04-30 12:01:49 -0700 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2012-04-30 12:52:38 -0700 |
commit | b39d3b9f7be925ba9314c336099f31f508e1d940 (patch) | |
tree | 5bc9d2f44becaef2b6e1d6d5114a6bc21f6302e2 /include/linux | |
parent | ce90208cf9e04df966429f115d8831371ea9afce (diff) |
Linux 3.3 compat, iops->create()/mkdir()/mknod()
The mode argument of iops->create()/mkdir()/mknod() was changed from
an 'int' to a 'umode_t'. To prevent a compiler warning an autoconf
check was added to detect the API change and then correctly set a
zpl_umode_t typedef. There is no functional change.
Signed-off-by: Brian Behlendorf <[email protected]>
Closes #701
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/Makefile.in | 1 | ||||
-rw-r--r-- | include/linux/vfs_compat.h | 12 |
2 files changed, 13 insertions, 0 deletions
diff --git a/include/linux/Makefile.in b/include/linux/Makefile.in index 28ead5737..bead46f10 100644 --- a/include/linux/Makefile.in +++ b/include/linux/Makefile.in @@ -65,6 +65,7 @@ am__aclocal_m4_deps = \ $(top_srcdir)/config/kernel-blk-rq-sectors.m4 \ $(top_srcdir)/config/kernel-blkdev-get-by-path.m4 \ $(top_srcdir)/config/kernel-check-disk-size-change.m4 \ + $(top_srcdir)/config/kernel-create-umode-t.m4 \ $(top_srcdir)/config/kernel-d-obtain-alias.m4 \ $(top_srcdir)/config/kernel-evict-inode.m4 \ $(top_srcdir)/config/kernel-fallocate.m4 \ diff --git a/include/linux/vfs_compat.h b/include/linux/vfs_compat.h index 371bbc1d1..74ec95f08 100644 --- a/include/linux/vfs_compat.h +++ b/include/linux/vfs_compat.h @@ -109,4 +109,16 @@ set_nlink(struct inode *inode, unsigned int nlink) } #endif /* HAVE_SET_NLINK */ +/* + * 3.3 API change, + * The VFS .create, .mkdir and .mknod callbacks were updated to take a + * umode_t type rather than an int. To cleanly handle both definitions + * the zpl_umode_t type is introduced and set accordingly. + */ +#ifdef HAVE_CREATE_UMODE_T +typedef umode_t zpl_umode_t; +#else +typedef int zpl_umode_t; +#endif + #endif /* _ZFS_VFS_H */ |