Whamcloud - gitweb
LU-4249 quota: race in qsd_upd_thread() 20/11020/2
authorNiu Yawei <yawei.niu@intel.com>
Wed, 9 Jul 2014 06:25:24 +0000 (02:25 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Thu, 14 Aug 2014 14:04:08 +0000 (14:04 +0000)
commitfe87443dcf15226000366ae638e71889dc18db95
tree8d3c18cc111325be2abf2a4ce7860f8ad51dfed8
parentf8805945e65f08ece96d6bbc8cdd348657db51b0
LU-4249 quota: race in qsd_upd_thread()

qsd_upd_thread() uses list_for_each_entry_safe() to process
list items one by one, however, it has to drop lock while
processing each item, that'll race with other list processing
thread.

The proper way is to check list head each time when it acquired
lock.

Lustre-commit: f8f7c34a7bbcf22aeca7699ce76254e41e3e95b7
Lustre-change: http://review.whamcloud.com/10988

Signed-off-by: Niu Yawei <yawei.niu@intel.com>
Change-Id: I83e665db4209d52c1358505125abdcba75a0a6fa
Reviewed-on: http://review.whamcloud.com/11020
Tested-by: Jenkins
Reviewed-by: Johann Lombardi <johann.lombardi@intel.com>
Reviewed-by: Fan Yong <fan.yong@intel.com>
Tested-by: Maloo <hpdd-maloo@intel.com>
lustre/quota/qsd_writeback.c