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

Skip to content
Commit 30c9afa6 authored by Joe Eykholt's avatar Joe Eykholt Committed by James Bottomley
Browse files

fix race that can give duplicate host number



Just once, two fcoe instances got the same host number
from scsi_add_host().

Use atomic_t and atomic_inc_return() to get next host number.
Subtract 1, so that scsi_host still starts with 0.

[jejb: added comment about unusual subtraction]
Signed-off-by: default avatarJoe Eykholt <jeykholt@cisco.com>
Signed-off-by: default avatarJames Bottomley <James.Bottomley@HansenPartnership.com>
parent 11198659
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment