Skip to content

Commit

Permalink
fix(inode_handle): call finish rangelock for data inode
Browse files Browse the repository at this point in the history
Signed-off-by: sundengyu <[email protected]>
  • Loading branch information
sundengyu committed Oct 21, 2024
1 parent 7935b59 commit a584323
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion lib/libuzfs/libuzfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ libuzfs_inode_handle_init(libuzfs_inode_handle_t *ihp,
ihp->ino = ino;
ihp->rc = 1;
ihp->gen = gen;
ihp->is_data_inode = B_TRUE;
ihp->is_data_inode = is_data_inode;

if (is_data_inode) {
VERIFY0(sa_lookup(sa_hdl, attr_tbl[UZFS_SIZE],
Expand Down Expand Up @@ -223,6 +223,10 @@ libuzfs_inode_handle_rele(libuzfs_inode_handle_t *ihp)
ASSERT(ihp->hp_kvattr_cache);
nvlist_free(ihp->hp_kvattr_cache);
sa_handle_destroy(ihp->sa_hdl);
rw_destroy(&ihp->hp_kvattr_cache_lock);
if (ihp->is_data_inode) {
zfs_rangelock_fini(&ihp->rl);
}
umem_free(ihp, sizeof (libuzfs_inode_handle_t));
}

Expand Down

0 comments on commit a584323

Please sign in to comment.