Whamcloud - gitweb
LU-2388 statahead: race in do_sa_entry_fini()
Two fixes:
* When iterating sa_entry list in do_sa_entry_fini(), there is
no lock, as may cause one entry put twice. To fix this, all
entries are put in one list, and only 'scanner' will drop
entry from this list.
* sa_entry may be linked to sai_sent_entries, but not hashed
yet, if ll_sa_entry_fini() is called at this moment, this
sa_entry may be unhashed.
Also include minor cleanup:
* rename do_sai_entry_fini() to do_sa_entry_fini().
* rename do_sai_entry_to_stated() to do_sa_entry_to_stated().
* rename do_statahead_interpret() to ll_post_statahead() to
distinguish from ll_statahead_interpret().
* ll_post_statahead() always post handle statahead from received
list to simplify logic.
Signed-off-by: Lai Siyao <lai.siyao@intel.com>
Change-Id: I3d0911d0bd3b940c9650473099604646408200c4
Reviewed-on: http://review.whamcloud.com/5842
Tested-by: Hudson
Reviewed-by: Fan Yong <fan.yong@intel.com>
Reviewed-by: Peng Tao <bergwolf@gmail.com>
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <oleg.drokin@intel.com>