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>
Fri, 2 Nov 2012 22:49:11 +0000 (18:49 -0400)
commit5588c6dd280355f47003c34f6f4e34eae4b577b5
tree9532c5b98c10aa9cbf1026efc153235df315946c
parentcfef8f002fa55a6ff72c01212a603ef03347eb78
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