Re: [PATCH 1/2] libiscsi: avoid unnecessary multiple NULL assignments

2013-04-10 Thread Mike Christie
On 04/10/2013 11:24 AM, micha...@cs.wisc.edu wrote: > From: Masatake YAMATO > > In iscsi_free_task, NULL is assigned to task->sc twice: before and > after kfifo_in invocatoin. Allocating and freeing iscsi_task are guarded > with session->lock, so multiple NULL assignments cause no trouble. But >

[PATCH 1/2] libiscsi: avoid unnecessary multiple NULL assignments

2013-04-10 Thread michaelc
From: Masatake YAMATO In iscsi_free_task, NULL is assigned to task->sc twice: before and after kfifo_in invocatoin. Allocating and freeing iscsi_task are guarded with session->lock, so multiple NULL assignments cause no trouble. But people reading the source code may be confused. The second NULL