aboutsummaryrefslogtreecommitdiffstats
path: root/module
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2012-02-02 11:55:48 -0800
committerBrian Behlendorf <[email protected]>2012-02-03 10:02:01 -0800
commit47621f3d76abf63e178b95a446134565cc553b1a (patch)
tree327a3b8be057b8272ede19352e5f344dca5b52cf /module
parentd7e398ce1a3e6f9c705af43955a684685a798c32 (diff)
Linux 3.3 compat, sops->show_options()
The second argument of sops->show_options() was changed from a 'struct vfsmount *' to a 'struct dentry *'. Add an autoconf check to detect the API change and then conditionally define the expected interface. In either case we are only interested in the zfs_sb_t. Signed-off-by: Brian Behlendorf <[email protected]> Closes #549
Diffstat (limited to 'module')
-rw-r--r--module/zfs/zpl_super.c24
1 files changed, 17 insertions, 7 deletions
diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c
index 3abb26a9e..0e6e9360f 100644
--- a/module/zfs/zpl_super.c
+++ b/module/zfs/zpl_super.c
@@ -139,21 +139,31 @@ zpl_remount_fs(struct super_block *sb, int *flags, char *data)
return (error);
}
+/*
+ * The Linux VFS automatically handles the following flags:
+ * MNT_NOSUID, MNT_NODEV, MNT_NOEXEC, MNT_NOATIME, MNT_READONLY
+ */
+#ifdef HAVE_SHOW_OPTIONS_WITH_DENTRY
static int
-zpl_show_options(struct seq_file *seq, struct vfsmount *vfsp)
+zpl_show_options(struct seq_file *seq, struct dentry *root)
{
- struct super_block *sb = vfsp->mnt_sb;
- zfs_sb_t *zsb = sb->s_fs_info;
+ zfs_sb_t *zsb = root->d_sb->s_fs_info;
+
+ seq_printf(seq, ",%s", zsb->z_flags & ZSB_XATTR ? "xattr" : "noxattr");
- /*
- * The Linux VFS automatically handles the following flags:
- * MNT_NOSUID, MNT_NODEV, MNT_NOEXEC, MNT_NOATIME, MNT_READONLY
- */
+ return (0);
+}
+#else
+static int
+zpl_show_options(struct seq_file *seq, struct vfsmount *vfsp)
+{
+ zfs_sb_t *zsb = vfsp->mnt_sb->s_fs_info;
seq_printf(seq, ",%s", zsb->z_flags & ZSB_XATTR ? "xattr" : "noxattr");
return (0);
}
+#endif /* HAVE_SHOW_OPTIONS_WITH_DENTRY */
static int
zpl_fill_super(struct super_block *sb, void *data, int silent)