Whamcloud - gitweb
LU-1438 quota: fix race in quota_chk_acq_common()
authorNiu Yawei <niu@whamcloud.com>
Fri, 1 Jun 2012 06:28:45 +0000 (23:28 -0700)
committerOleg Drokin <green@whamcloud.com>
Mon, 4 Jun 2012 07:21:48 +0000 (03:21 -0400)
commitca1cae1eaec9f37d55d54ecc2fa93ece3d146ff6
tree49cdb733f987c5b84c39b3d0568a3a9a6a158d8d
parent3ecf127dd152fda46b81cd43186db7c940f85d3e
LU-1438 quota: fix race in quota_chk_acq_common()

quota_check_common() & qctxt_adjust_qunit() uses different way
to check if quota is enforced on certain ID, which could result
in infinite loop in quota_chk_acq_common() when the QB/QI_SET
flag is cleared just after checking.

This patch used a non-instrusive way to fix this rare race.

Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ia8c5cb593abf515cf4dc041c63c8a247ebe0cd03
Reviewed-on: http://review.whamcloud.com/2996
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Oleg Drokin <green@whamcloud.com>
lustre/quota/quota_context.c