Whamcloud - gitweb
LU-4249 quota: race in qsd_upd_thread() 88/10988/2
authorNiu Yawei <yawei.niu@intel.com>
Fri, 4 Jul 2014 03:51:10 +0000 (23:51 -0400)
committerOleg Drokin <oleg.drokin@intel.com>
Tue, 8 Jul 2014 15:42:12 +0000 (15:42 +0000)
commitfb855d0a03b5702ab38942fc1b1e41b28420acfd
tree60ca2c239cf0a1ba4fac83a4bc2cf517fb9beff3
parentde2d5808bd2987f76d2486272e1a9c192ba277d4
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.

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