Permalink
Browse files

Linux 3.6 fixes (part 3)

- .write_super is removed from super_operations.

Signed-off-by: Yuxuan Shui <yshuiv7@gmail.com>
  • Loading branch information...
1 parent 5406b06 commit e47aa5b16595ea35904939a57a7df0c8c6a5272c @nialv7 nialv7 committed with Oct 12, 2012
Showing with 22 additions and 0 deletions.
  1. +19 −0 config/kernel-write-super.m4
  2. +1 −0 config/kernel.m4
  3. +2 −0 module/zfs/zpl_super.c
@@ -0,0 +1,19 @@
+dnl #
+dnl # 3.6 API change
+dnl #
+AC_DEFUN([ZFS_AC_KERNEL_WRITE_SUPER], [
+ AC_MSG_CHECKING([whether sops->write_super() exists])
+ ZFS_LINUX_TRY_COMPILE([
+ #include <linux/fs.h>
+ ],[
+ struct super_operations sops __attribute__ ((unused)) = {
+ .write_super = NULL
+ };
+ ],[
+ AC_MSG_RESULT(yes)
+ AC_DEFINE(HAVE_WRITE_SUPRT, 1,
+ [sops->write_super() exists])
+ ],[
+ AC_MSG_RESULT(no)
+ ])
+])
View
@@ -46,6 +46,7 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
ZFS_AC_KERNEL_SHOW_OPTIONS
ZFS_AC_KERNEL_FSYNC
ZFS_AC_KERNEL_EVICT_INODE
+ ZFS_AC_KERNEL_WRITE_SUPER
ZFS_AC_KERNEL_NR_CACHED_OBJECTS
ZFS_AC_KERNEL_FREE_CACHED_OBJECTS
ZFS_AC_KERNEL_FALLOCATE
View
@@ -316,7 +316,9 @@ const struct super_operations zpl_super_operations = {
.delete_inode = zpl_inode_delete,
#endif /* HAVE_EVICT_INODE */
.put_super = zpl_put_super,
+#ifdef HAVE_WRITE_SUPER
.write_super = NULL,
+#endif
.sync_fs = zpl_sync_fs,
.statfs = zpl_statfs,
.remount_fs = zpl_remount_fs,

0 comments on commit e47aa5b

Please sign in to comment.