From 67d4234e5180c2a12371f2072d032f1323936ce1 Mon Sep 17 00:00:00 2001 From: Alex Zhuravlev Date: Thu, 13 Feb 2025 16:27:14 +0300 Subject: [PATCH] LU-18720 quota: check for project quota lqi_ignore_root_proj_quota should be checked only with project quota, otherwise it's state is undefined and can lead to undefined results. Fixes: 2686838fef ("LU-18240 sec: enforce per-nodemap project quota for root") Test-Parameters: testlist=sanity-quota,sanity-quota,sanity-quota Test-Parameters: fstype=zfs testlist=sanity-quota,sanity-quota,sanity-quota Signed-off-by: Alex Zhuravlev Change-Id: I02896639ed375ddd314fa44dc9cddb008b1dbb0b Reviewed-on: https://review.whamcloud.com/c/fs/lustre-release/+/58066 Tested-by: jenkins Tested-by: Maloo Reviewed-by: Oleg Drokin Reviewed-by: Sebastien Buisson Reviewed-by: Sergey Cheremencev --- lustre/quota/qsd_handler.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lustre/quota/qsd_handler.c b/lustre/quota/qsd_handler.c index 0567ad7..2960447 100644 --- a/lustre/quota/qsd_handler.c +++ b/lustre/quota/qsd_handler.c @@ -896,7 +896,7 @@ int qsd_op_begin(const struct lu_env *env, struct qsd_instance *qsd, (qsd->qsd_type_array[qi->lqi_type])->qqi_acct_failed) RETURN(0); - if (local_flags && qi->lqi_id.qid_projid && + if (qi->lqi_type == PRJQUOTA && local_flags && qi->lqi_id.qid_projid && (qsd->qsd_root_prj_enable || !qi->lqi_ignore_root_proj_quota)) *local_flags |= QUOTA_FL_ROOT_PRJQUOTA; -- 1.8.3.1