In filter_quota_getflag(), we shouldn't break the loop when the file owner's
quota limit isn't set, otherwise, the check for the file group will be skipped
and the out of quota flag will not be returned to client at the end.
Signed-off-by: Niu Yawei <niu@whamcloud.com>
Change-Id: Ibf6f1fe3a550ce1f4b3d627fe24ca4484e754a41
Reviewed-on: http://review.whamcloud.com/1153
Reviewed-by: Fan Yong <yong.fan@whamcloud.com>
Tested-by: Hudson
Reviewed-by: Johann Lombardi <johann@whamcloud.com>
lqs = quota_search_lqs(LQS_KEY(cnt, GET_OA_ID(cnt, oa)),
qctxt, 0);
- if (lqs == NULL || IS_ERR(lqs)) {
+ if (IS_ERR(lqs)) {
rc = PTR_ERR(lqs);
+ CDEBUG(D_QUOTA, "search lqs for %s %d failed,"
+ "(rc = %d)\n",
+ cnt == USRQUOTA ? "user" : "group",
+ GET_OA_ID(cnt, oa), rc);
break;
+ } else if (lqs == NULL) {
+ /* continue to check group quota if quota limit
+ * of the file's user owner isn't set. LU-530 */
+ continue;
} else {
spin_lock(&lqs->lqs_lock);
if (lqs->lqs_bunit_sz <= qctxt->lqc_sync_blk) {