Skip to content
Commit f27bac27 authored by Tejun Heo's avatar Tejun Heo Committed by James Bottomley
Browse files

[SCSI] sd: update index allocation and use ida instead of idr



Update index allocation as follows.

* sd_index_idr is used only for ID allocation and mapping
  functionality is not used.  Use more memory efficient ida instead.

* idr and ida have their own locks inside them and don't need them for
  operation.  Drop it.

* index wasn't freed if probing failed after index allocation.  fix
  it.

* ida allocation should be repeated if it fails with -EAGAIN.

Signed-off-by: default avatarTejun Heo <tj@kernel.org>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent ecefe8a9
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment