Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 1d023284 authored by Ken Helias's avatar Ken Helias Committed by Linus Torvalds
Browse files

list: fix order of arguments for hlist_add_after(_rcu)



All other add functions for lists have the new item as first argument
and the position where it is added as second argument.  This was changed
for no good reason in this function and makes using it unnecessary
confusing.

The name was changed to hlist_add_behind() to cause unconverted code to
generate a compile error instead of using the wrong parameter order.

[akpm@linux-foundation.org: coding-style fixes]
Signed-off-by: default avatarKen Helias <kenhelias@firemail.de>
Cc: "Paul E. McKenney" <paulmck@linux.vnet.ibm.com>
Acked-by: Jeff Kirsher <jeffrey.t.kirsher@intel.com>	[intel driver bits]
Cc: Hugh Dickins <hughd@google.com>
Cc: Christoph Hellwig <hch@infradead.org>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent bc18dd33
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -818,7 +818,7 @@ RCU pointer/list update:
	list_add_tail_rcu
	list_del_rcu
	list_replace_rcu
	hlist_add_after_rcu
	hlist_add_behind_rcu
	hlist_add_before_rcu
	hlist_add_head_rcu
	hlist_del_rcu
+1 −1
Original line number Diff line number Diff line
@@ -125,7 +125,7 @@ int drm_ht_insert_item(struct drm_open_hash *ht, struct drm_hash_item *item)
		parent = &entry->head;
	}
	if (parent) {
		hlist_add_after_rcu(parent, &item->head);
		hlist_add_behind_rcu(&item->head, parent);
	} else {
		hlist_add_head_rcu(&item->head, h_list);
	}
+1 −1
Original line number Diff line number Diff line
@@ -1948,7 +1948,7 @@ static int i40e_update_ethtool_fdir_entry(struct i40e_vsi *vsi,

	/* add filter to the list */
	if (parent)
		hlist_add_after(&parent->fdir_node, &input->fdir_node);
		hlist_add_behind(&input->fdir_node, &parent->fdir_node);
	else
		hlist_add_head(&input->fdir_node,
			       &pf->fdir_filter_list);
+1 −1
Original line number Diff line number Diff line
@@ -2517,7 +2517,7 @@ static int ixgbe_update_ethtool_fdir_entry(struct ixgbe_adapter *adapter,

	/* add filter to the list */
	if (parent)
		hlist_add_after(&parent->fdir_node, &input->fdir_node);
		hlist_add_behind(&input->fdir_node, &parent->fdir_node);
	else
		hlist_add_head(&input->fdir_node,
			       &adapter->fdir_filter_list);
+2 −2
Original line number Diff line number Diff line
@@ -351,7 +351,7 @@ cfs_hash_dh_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd,
					    cfs_hash_dhead_t, dh_head);

	if (dh->dh_tail != NULL) /* not empty */
		hlist_add_after(dh->dh_tail, hnode);
		hlist_add_behind(hnode, dh->dh_tail);
	else /* empty list */
		hlist_add_head(hnode, &dh->dh_head);
	dh->dh_tail = hnode;
@@ -406,7 +406,7 @@ cfs_hash_dd_hnode_add(struct cfs_hash *hs, struct cfs_hash_bd *bd,
						cfs_hash_dhead_dep_t, dd_head);

	if (dh->dd_tail != NULL) /* not empty */
		hlist_add_after(dh->dd_tail, hnode);
		hlist_add_behind(hnode, dh->dd_tail);
	else /* empty list */
		hlist_add_head(hnode, &dh->dd_head);
	dh->dd_tail = hnode;
Loading