mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2024-12-26 03:09:34 +03:00
Linux: disable lockdep for a couple of locks
When running a debug kernel with lockdep enabled there are several locks which report false positives. Set MUTEX_NOLOCKDEP/RW_NOLOCKDEP to disable these warnings. Reviewed-by: Brian Atkinson <batkinson@lanl.gov> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov> Closes #16188
This commit is contained in:
parent
136c053211
commit
abec7dcd30
@ -234,7 +234,7 @@ procfs_list_install(const char *module,
|
|||||||
modulestr = kmem_asprintf("%s/%s", module, submodule);
|
modulestr = kmem_asprintf("%s/%s", module, submodule);
|
||||||
else
|
else
|
||||||
modulestr = kmem_asprintf("%s", module);
|
modulestr = kmem_asprintf("%s", module);
|
||||||
mutex_init(&procfs_list->pl_lock, NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(&procfs_list->pl_lock, NULL, MUTEX_NOLOCKDEP, NULL);
|
||||||
list_create(&procfs_list->pl_list,
|
list_create(&procfs_list->pl_list,
|
||||||
procfs_list_node_off + sizeof (procfs_list_node_t),
|
procfs_list_node_off + sizeof (procfs_list_node_t),
|
||||||
procfs_list_node_off + offsetof(procfs_list_node_t, pln_link));
|
procfs_list_node_off + offsetof(procfs_list_node_t, pln_link));
|
||||||
|
@ -292,8 +292,8 @@ dbuf_cons(void *vdb, void *unused, int kmflag)
|
|||||||
dmu_buf_impl_t *db = vdb;
|
dmu_buf_impl_t *db = vdb;
|
||||||
memset(db, 0, sizeof (dmu_buf_impl_t));
|
memset(db, 0, sizeof (dmu_buf_impl_t));
|
||||||
|
|
||||||
mutex_init(&db->db_mtx, NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(&db->db_mtx, NULL, MUTEX_NOLOCKDEP, NULL);
|
||||||
rw_init(&db->db_rwlock, NULL, RW_DEFAULT, NULL);
|
rw_init(&db->db_rwlock, NULL, RW_NOLOCKDEP, NULL);
|
||||||
cv_init(&db->db_changed, NULL, CV_DEFAULT, NULL);
|
cv_init(&db->db_changed, NULL, CV_DEFAULT, NULL);
|
||||||
multilist_link_init(&db->db_cache_link);
|
multilist_link_init(&db->db_cache_link);
|
||||||
zfs_refcount_create(&db->db_holds);
|
zfs_refcount_create(&db->db_holds);
|
||||||
@ -958,7 +958,7 @@ dbuf_init(void)
|
|||||||
0, dbuf_cons, dbuf_dest, NULL, NULL, NULL, 0);
|
0, dbuf_cons, dbuf_dest, NULL, NULL, NULL, 0);
|
||||||
|
|
||||||
for (int i = 0; i < hmsize; i++)
|
for (int i = 0; i < hmsize; i++)
|
||||||
mutex_init(&h->hash_mutexes[i], NULL, MUTEX_DEFAULT, NULL);
|
mutex_init(&h->hash_mutexes[i], NULL, MUTEX_NOLOCKDEP, NULL);
|
||||||
|
|
||||||
dbuf_stats_init(h);
|
dbuf_stats_init(h);
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user