diff options
Diffstat (limited to 'drivers/scsi/libfc/fc_exch.c')
-rw-r--r-- | drivers/scsi/libfc/fc_exch.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/scsi/libfc/fc_exch.c b/drivers/scsi/libfc/fc_exch.c index dc12a2bf0c9b..d0496dafd84a 100644 --- a/drivers/scsi/libfc/fc_exch.c +++ b/drivers/scsi/libfc/fc_exch.c | |||
@@ -676,9 +676,10 @@ static struct fc_exch *fc_exch_em_alloc(struct fc_lport *lport, | |||
676 | } | 676 | } |
677 | memset(ep, 0, sizeof(*ep)); | 677 | memset(ep, 0, sizeof(*ep)); |
678 | 678 | ||
679 | cpu = smp_processor_id(); | 679 | cpu = get_cpu(); |
680 | pool = per_cpu_ptr(mp->pool, cpu); | 680 | pool = per_cpu_ptr(mp->pool, cpu); |
681 | spin_lock_bh(&pool->lock); | 681 | spin_lock_bh(&pool->lock); |
682 | put_cpu(); | ||
682 | index = pool->next_index; | 683 | index = pool->next_index; |
683 | /* allocate new exch from pool */ | 684 | /* allocate new exch from pool */ |
684 | while (fc_exch_ptr_get(pool, index)) { | 685 | while (fc_exch_ptr_get(pool, index)) { |