Skip to content

Commit 8ce6b17

Browse files
committed
fixup to "Elide locking db_data and db_mtx where it seems safe"
On Linux, assert_db_data_contents_locked can't take the db pointer as a const pointer, because the rwsem_is_locked function requires mutable access .
1 parent 9772ffc commit 8ce6b17

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

module/zfs/dbuf.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -297,7 +297,11 @@ assert_db_data_addr_locked(const dmu_buf_impl_t *db)
297297
}
298298

299299
void
300+
#ifdef __linux__
301+
assert_db_data_contents_locked(dmu_buf_impl_t *db, boolean_t writer)
302+
#else
300303
assert_db_data_contents_locked(const dmu_buf_impl_t *db, boolean_t writer)
304+
#endif
301305
{
302306
/*
303307
* db_rwlock protects indirect blocks and the data block of the meta

0 commit comments

Comments
 (0)