diff options
Diffstat (limited to 'module/zfs/zpl_ctldir.c')
-rw-r--r-- | module/zfs/zpl_ctldir.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/module/zfs/zpl_ctldir.c b/module/zfs/zpl_ctldir.c index 54bdbe409..089701707 100644 --- a/module/zfs/zpl_ctldir.c +++ b/module/zfs/zpl_ctldir.c @@ -267,6 +267,7 @@ zpl_snapdir_lookup(struct inode *dip, struct dentry *dentry, return ERR_PTR(error); ASSERT(error == 0 || ip == NULL); + d_clear_d_op(dentry); d_set_d_op(dentry, &zpl_dops_snapdirs); return d_splice_alias(ip, dentry); @@ -370,6 +371,7 @@ zpl_snapdir_mkdir(struct inode *dip, struct dentry *dentry, zpl_umode_t mode) error = -zfsctl_snapdir_mkdir(dip, dname(dentry), vap, &ip, cr, 0); if (error == 0) { + d_clear_d_op(dentry); d_set_d_op(dentry, &zpl_dops_snapdirs); d_instantiate(dentry, ip); } |