Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/external/cddl/osnet/dist/uts/common/fs/zfs Add missing ZFS_O...
details: https://anonhg.NetBSD.org/src/rev/aaedbf3d27a0
branches: trunk
changeset: 837469:aaedbf3d27a0
user: hannken <hannken%NetBSD.org@localhost>
date: Thu Dec 06 09:58:52 2018 +0000
description:
Add missing ZFS_OBJ_HOLD_ENTER() / ZFS_OBJ_HOLD_EXIT() to zfs_zget_cleaner().
diffstat:
external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c | 8 +++++++-
1 files changed, 7 insertions(+), 1 deletions(-)
diffs (32 lines):
diff -r 274779e50e43 -r aaedbf3d27a0 external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c
--- a/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Thu Dec 06 06:29:56 2018 +0000
+++ b/external/cddl/osnet/dist/uts/common/fs/zfs/zfs_znode.c Thu Dec 06 09:58:52 2018 +0000
@@ -1188,8 +1188,11 @@
znode_t *zp;
int err;
+ ZFS_OBJ_HOLD_ENTER(zfsvfs, obj_num);
+
err = sa_buf_hold(zfsvfs->z_os, obj_num, NULL, &db);
if (err) {
+ ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
return (SET_ERROR(err));
}
@@ -1199,12 +1202,15 @@
(doi.doi_bonus_type == DMU_OT_ZNODE &&
doi.doi_bonus_size < sizeof (znode_phys_t)))) {
sa_buf_rele(db, NULL);
+ ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
return (SET_ERROR(EINVAL));
}
hdl = dmu_buf_get_user(db);
- KASSERT(hdl != NULL);
+ ASSERT3P(hdl, !=, NULL);
zp = sa_get_userdata(hdl);
+ ASSERT3U(zp->z_id, ==, obj_num);
sa_buf_rele(db, NULL);
+ ZFS_OBJ_HOLD_EXIT(zfsvfs, obj_num);
*zpp = zp;
return (0);
}
Home |
Main Index |
Thread Index |
Old Index