]> git.proxmox.com Git - mirror_ubuntu-bionic-kernel.git/commit
idr: Return the deleted entry from idr_remove
authorMatthew Wilcox <mawilcox@microsoft.com>
Thu, 22 Dec 2016 18:30:22 +0000 (13:30 -0500)
committerMatthew Wilcox <mawilcox@microsoft.com>
Tue, 14 Feb 2017 02:44:03 +0000 (21:44 -0500)
commitd3e709e63e97e5f3f129b639991cfe266da60bae
tree78647f4029b9e83087fefa19144a689f6909f8d2
parent8ac04868315c6ffcb2c5a5ad9cd5cec61cad3576
idr: Return the deleted entry from idr_remove

It is a relatively common idiom (8 instances) to first look up an IDR
entry, and then remove it from the tree if it is found, possibly doing
further operations upon the entry afterwards.  If we change idr_remove()
to return the removed object, all of these users can save themselves a
walk of the IDR tree.

Signed-off-by: Matthew Wilcox <mawilcox@microsoft.com>
drivers/atm/nicstar.c
drivers/block/drbd/drbd_main.c
drivers/firewire/core-cdev.c
drivers/gpu/drm/amd/amdgpu/amdgpu_bo_list.c
drivers/gpu/drm/amd/amdgpu/amdgpu_ctx.c
drivers/net/wireless/marvell/mwifiex/txrx.c
drivers/target/target_core_user.c
include/linux/idr.h
net/mac80211/status.c