Whamcloud - gitweb
LU-1438 quota: fix race in quota_chk_acq_common()
authorNiu Yawei <niu@whamcloud.com>
Mon, 28 May 2012 09:12:08 +0000 (02:12 -0700)
committerJohann Lombardi <johann@whamcloud.com>
Wed, 30 May 2012 09:16:43 +0000 (05:16 -0400)
commit423bfd10973c4adf18a68f9a8e11f934da6394e0
treeca1dc657f6cc24da4a549c3e5060f0209bef48bd
parente92a9dd7a71bfcc33296a80e2e526ef86d38f750
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: I7212e9fc85e98a40e36d2773c02f838ca68339bb
Reviewed-on: http://review.whamcloud.com/2927
Tested-by: Hudson
Tested-by: Maloo <whamcloud.maloo@gmail.com>
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lustre/quota/quota_context.c