From ee93035378ff1f0769bb4216dc35057a2f14f9b9 Mon Sep 17 00:00:00 2001 From: Brian Behlendorf Date: Fri, 18 Jan 2013 14:11:40 -0800 Subject: Use sb->s_d_op default dentry operations As of Linux 2.6.37 the right way to register custom dentry operations is to use the super block's ->s_d_op field. For older kernels they should be registered as part of the lookup operation. Signed-off-by: Brian Behlendorf Closes #1223 --- module/zfs/zfs_vfsops.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'module/zfs/zfs_vfsops.c') diff --git a/module/zfs/zfs_vfsops.c b/module/zfs/zfs_vfsops.c index f44524238..620e39bc2 100644 --- a/module/zfs/zfs_vfsops.c +++ b/module/zfs/zfs_vfsops.c @@ -1188,6 +1188,9 @@ zfs_domount(struct super_block *sb, void *data, int silent) sb->s_op = &zpl_super_operations; sb->s_xattr = zpl_xattr_handlers; sb->s_export_op = &zpl_export_operations; +#ifdef HAVE_S_D_OP + sb->s_d_op = &zpl_dentry_operations; +#endif /* HAVE_S_D_OP */ /* Set features for file system. */ zfs_set_fuid_feature(zsb); -- cgit v1.2.3