scsi: fcoe: Add a local_lock to fcoe_percpu
[linux-2.6-microblaze.git] / drivers / scsi / fcoe / fcoe.c
index 983e001..af9b788 100644 (file)
@@ -1453,9 +1453,10 @@ static int fcoe_alloc_paged_crc_eof(struct sk_buff *skb, int tlen)
        struct fcoe_percpu_s *fps;
        int rc;
 
-       fps = &get_cpu_var(fcoe_percpu);
+       local_lock(&fcoe_percpu.lock);
+       fps = this_cpu_ptr(&fcoe_percpu);
        rc = fcoe_get_paged_crc_eof(skb, tlen, fps);
-       put_cpu_var(fcoe_percpu);
+       local_unlock(&fcoe_percpu.lock);
 
        return rc;
 }
@@ -2488,6 +2489,7 @@ static int __init fcoe_init(void)
                p = per_cpu_ptr(&fcoe_percpu, cpu);
                INIT_WORK(&p->work, fcoe_receive_work);
                skb_queue_head_init(&p->fcoe_rx_list);
+               local_lock_init(&p->lock);
        }
 
        /* Setup link change notification */