aboutsummaryrefslogtreecommitdiff
path: root/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c
diff options
context:
space:
mode:
authorMartin Matuska <mm@FreeBSD.org>2023-01-25 18:50:29 +0000
committerMartin Matuska <mm@FreeBSD.org>2023-01-25 18:50:29 +0000
commit15f0b8c309dea1dcb14d3e374686576ff68ac43f (patch)
tree8deb5ea3d3e71ae088585ae5d9081d647edf2b3c /sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c
parentda52fc464a4c80fdbed551824064d203831b4e7b (diff)
parent9cd71c8604d52def22ffaddc35755712f0fb9349 (diff)
downloadsrc-15f0b8c309dea1dcb14d3e374686576ff68ac43f.tar.gz
src-15f0b8c309dea1dcb14d3e374686576ff68ac43f.zip
zfs: merge openzfs/zfs@9cd71c860 (master)
Notable upstream pull request merges: #13805 Configure zed's diagnosis engine with vdev properties #14110 zfs list: Allow more fields in ZFS_ITER_SIMPLE mode #14121 Batch enqueue/dequeue for bqueue #14123 arc_read()/arc_access() refactoring and cleanup #14159 Bypass metaslab throttle for removal allocations #14243 Implement uncached prefetch #14251 Cache dbuf_hash() calculation #14253 Allow reciever to override encryption property in case of replication #14254 Restrict visibility of per-dataset kstats inside FreeBSD jails #14255 Zero end of embedded block buffer in dump_write_embedded() #14263 Cleanups identified by CodeQL and Coverity #14264 Miscellaneous fixes #14272 Change ZEVENT_POOL_GUID to ZEVENT_POOL to display pool names #14287 FreeBSD: Remove stray debug printf #14288 Colorize zfs diff output #14289 deadlock between spa_errlog_lock and dp_config_rwlock #14291 FreeBSD: Fix potential boot panic with bad label #14292 Add tunable to allow changing micro ZAP's max size #14293 Turn default_bs and default_ibs into ZFS_MODULE_PARAMs #14295 zed: add hotplug support for spare vdevs #14304 Activate filesystem features only in syncing context #14311 zpool: do guid-based comparison in is_vdev_cb() #14317 Pack zrlock_t by 8 bytes #14320 Update arc_summary and arcstat outputs #14328 FreeBSD: catch up to 1400077 #14376 Use setproctitle to report progress of zfs send #14340 Remove some dead ARC code #14358 Wait for txg sync if the last DRR_FREEOBJECTS might result in a hole #14360 libzpool: fix ddi_strtoull to update nptr #14364 Fix unprotected zfs_znode_dmu_fini #14379 zfs_receive_one: Check for the more likely error first #14380 Cleanup of dead code suggested by Clang Static Analyzer #14397 Avoid passing an uninitialized index to dsl_prop_known_index #14404 Fix reading uninitialized variable in receive_read #14407 free_blocks(): Fix reports from 2016 PVS Studio FreeBSD report #14418 Introduce minimal ZIL block commit delay #14422 x86 assembly: fix .size placement and replace .align with .balign Obtained from: OpenZFS OpenZFS commit: 9cd71c8604d52def22ffaddc35755712f0fb9349
Diffstat (limited to 'sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c')
-rw-r--r--sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c
index 07232086d52b..948df8e50de1 100644
--- a/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c
+++ b/sys/contrib/openzfs/module/os/freebsd/zfs/zfs_dir.c
@@ -426,6 +426,7 @@ zfs_rmnode(znode_t *zp)
zfsvfs_t *zfsvfs = zp->z_zfsvfs;
objset_t *os = zfsvfs->z_os;
dmu_tx_t *tx;
+ uint64_t z_id = zp->z_id;
uint64_t acl_obj;
uint64_t xattr_obj;
uint64_t count;
@@ -445,8 +446,10 @@ zfs_rmnode(znode_t *zp)
* Not enough space to delete some xattrs.
* Leave it in the unlinked set.
*/
+ ZFS_OBJ_HOLD_ENTER(zfsvfs, z_id);
zfs_znode_dmu_fini(zp);
zfs_znode_free(zp);
+ ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id);
return;
}
} else {
@@ -464,8 +467,10 @@ zfs_rmnode(znode_t *zp)
* Not enough space or we were interrupted by unmount.
* Leave the file in the unlinked set.
*/
+ ZFS_OBJ_HOLD_ENTER(zfsvfs, z_id);
zfs_znode_dmu_fini(zp);
zfs_znode_free(zp);
+ ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id);
return;
}
}
@@ -501,8 +506,10 @@ zfs_rmnode(znode_t *zp)
* which point we'll call zfs_unlinked_drain() to process it).
*/
dmu_tx_abort(tx);
+ ZFS_OBJ_HOLD_ENTER(zfsvfs, z_id);
zfs_znode_dmu_fini(zp);
zfs_znode_free(zp);
+ ZFS_OBJ_HOLD_EXIT(zfsvfs, z_id);
return;
}