FreeBSD: Add zfs_link_create() error handling

Originally Solaris didn't expect errors there, but they may happen
if we fail to add entry into ZAP.  Linux fixed it in #7421, but it
was never fully ported to FreeBSD.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Alexander Motin <mav@FreeBSD.org>
Sponsored-By: iXsystems, Inc.
Closes #13215
Closes #16138
This commit is contained in:
Alexander Motin
2024-05-16 20:56:55 -04:00
committed by Brian Behlendorf
parent fa4b1a404e
commit 4c0fbd8d6d
4 changed files with 43 additions and 14 deletions
+1
View File
@@ -543,6 +543,7 @@ zfs_rmnode(znode_t *zp)
dataset_kstats_update_nunlinked_kstat(&zfsvfs->z_kstat, 1);
zfs_znode_delete(zp, tx);
zfs_znode_free(zp);
dmu_tx_commit(tx);