Message ID | 1457710143-29182-4-git-send-email-bigeasy@linutronix.de (mailing list archive) |
---|---|
State | Changes Requested, archived |
Headers | show |
diff --git a/drivers/scsi/fcoe/fcoe.c b/drivers/scsi/fcoe/fcoe.c index efbc8a1438ef..50e9e980563e 100644 --- a/drivers/scsi/fcoe/fcoe.c +++ b/drivers/scsi/fcoe/fcoe.c @@ -1334,10 +1334,8 @@ static void fcoe_percpu_thread_destroy(unsigned int cpu) * will reach this case and we will drop all skbs and later * stop the thread. */ - spin_lock_bh(&p->fcoe_rx_list.lock); while ((skb = __skb_dequeue(&p->fcoe_rx_list)) != NULL) kfree_skb(skb); - spin_unlock_bh(&p->fcoe_rx_list.lock); } put_cpu();
The locking here is not required. At the begin of the function we hold the lock and assign NULL to p->thread. This is used in other places to ensure that nobody adds new items to the list. Also, in the cpu != targ_cpu case we don't hold the lock of p-> as well. This makes is consistent. Cc: Vasu Dev <vasu.dev@intel.com> Cc: "James E.J. Bottomley" <JBottomley@odin.com> Cc: "Martin K. Petersen" <martin.petersen@oracle.com> Cc: Christoph Hellwig <hch@lst.de> Cc: fcoe-devel@open-fcoe.org Cc: linux-scsi@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> --- drivers/scsi/fcoe/fcoe.c | 2 -- 1 file changed, 2 deletions(-)