+++ /dev/null
-dnl #
-dnl # 3.15 API change
-dnl # inode_set_flags introduced to set i_flags
-dnl #
-AC_DEFUN([ZFS_AC_KERNEL_SRC_INODE_SET_FLAGS], [
- ZFS_LINUX_TEST_SRC([inode_set_flags], [
- #include <linux/fs.h>
- ],[
- struct inode inode;
- inode_set_flags(&inode, S_IMMUTABLE, S_IMMUTABLE);
- ])
-])
-
-AC_DEFUN([ZFS_AC_KERNEL_INODE_SET_FLAGS], [
- AC_MSG_CHECKING([whether inode_set_flags() exists])
- ZFS_LINUX_TEST_RESULT([inode_set_flags], [
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_INODE_SET_FLAGS, 1, [inode_set_flags() exists])
- ],[
- AC_MSG_RESULT(no)
- ])
-])
ZFS_AC_KERNEL_SRC_ACL
ZFS_AC_KERNEL_SRC_INODE_SETATTR
ZFS_AC_KERNEL_SRC_INODE_GETATTR
- ZFS_AC_KERNEL_SRC_INODE_SET_FLAGS
ZFS_AC_KERNEL_SRC_INODE_SET_IVERSION
ZFS_AC_KERNEL_SRC_SHOW_OPTIONS
ZFS_AC_KERNEL_SRC_FILEMAP
ZFS_AC_KERNEL_ACL
ZFS_AC_KERNEL_INODE_SETATTR
ZFS_AC_KERNEL_INODE_GETATTR
- ZFS_AC_KERNEL_INODE_SET_FLAGS
ZFS_AC_KERNEL_INODE_SET_IVERSION
ZFS_AC_KERNEL_SHOW_OPTIONS
ZFS_AC_KERNEL_FILEMAP
* Linux and Solaris have different sets of file attributes, so we
* restrict this conversion to the intersection of the two.
*/
-#ifdef HAVE_INODE_SET_FLAGS
unsigned int flags = 0;
if (zp->z_pflags & ZFS_IMMUTABLE)
flags |= S_IMMUTABLE;
flags |= S_APPEND;
inode_set_flags(ip, flags, S_IMMUTABLE|S_APPEND);
-#else
- if (zp->z_pflags & ZFS_IMMUTABLE)
- ip->i_flags |= S_IMMUTABLE;
- else
- ip->i_flags &= ~S_IMMUTABLE;
-
- if (zp->z_pflags & ZFS_APPENDONLY)
- ip->i_flags |= S_APPEND;
- else
- ip->i_flags &= ~S_APPEND;
-#endif
}
/*