mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-22 10:37:35 +03:00
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 <behlendorf1@llnl.gov> Closes #549
This commit is contained in:
+18
-8
@@ -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;
|
||||
|
||||
/*
|
||||
* The Linux VFS automatically handles the following flags:
|
||||
* MNT_NOSUID, MNT_NODEV, MNT_NOEXEC, MNT_NOATIME, MNT_READONLY
|
||||
*/
|
||||
zfs_sb_t *zsb = root->d_sb->s_fs_info;
|
||||
|
||||
seq_printf(seq, ",%s", zsb->z_flags & ZSB_XATTR ? "xattr" : "noxattr");
|
||||
|
||||
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)
|
||||
|
||||
Reference in New Issue
Block a user