mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-31 11:14:09 +03:00
Linux 3.9 compat: Switch to hlist_for_each{,_rcu}
torvalds/linux@b67bfe0d42 changed hlist_for_each_entry{,_rcu} to take 3 arguments instead of 4. We handle this by switching to hlist_for_each{,_rcu}, which works across all supported kernels. Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu> Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
This commit is contained in:
committed by
Brian Behlendorf
parent
8274ed5988
commit
4a31e5aa9b
@@ -113,7 +113,8 @@ tsd_hash_search(tsd_hash_table_t *table, uint_t key, pid_t pid)
|
||||
hash = hash_long((ulong_t)key * (ulong_t)pid, table->ht_bits);
|
||||
bin = &table->ht_bins[hash];
|
||||
spin_lock(&bin->hb_lock);
|
||||
hlist_for_each_entry(entry, node, &bin->hb_head, he_list) {
|
||||
hlist_for_each(node, &bin->hb_head) {
|
||||
entry = list_entry(node, tsd_hash_entry_t, he_list);
|
||||
if ((entry->he_key == key) && (entry->he_pid == pid)) {
|
||||
spin_unlock(&bin->hb_lock);
|
||||
SRETURN(entry);
|
||||
|
||||
Reference in New Issue
Block a user