From eb3efbe54dc8876a89581a078516e1c21c3d9956 Mon Sep 17 00:00:00 2001 From: Pavel Snajdr Date: Thu, 31 Oct 2024 04:19:25 +0100 Subject: [PATCH] wip --- module/os/linux/zfs/zpl_inode.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/module/os/linux/zfs/zpl_inode.c b/module/os/linux/zfs/zpl_inode.c index c95411be6087..f7328c09ffbd 100644 --- a/module/os/linux/zfs/zpl_inode.c +++ b/module/os/linux/zfs/zpl_inode.c @@ -786,10 +786,9 @@ zpl_link(struct dentry *old_dentry, struct inode *dir, struct dentry *dentry) cookie = spl_fstrans_mark(); error = -zfs_link(ITOZ(dir), zp, dname(dentry), cr, 0); - if (error) { - zrele(zp); + if (error) goto out; - } + d_instantiate(dentry, ZTOI(zp)); out: