Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 6EB7942668E; Wed, 30 Sep 2026 19:38:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790797118; cv=none; b=oAo2IXOP+Fd8AFb0xsP5Z5duioQUSxQuiPrk3nt9FmTmokwgJf/kK4Vv7prCBdsxUP5nxKjHy6GwB7McfNxHjQj/2L9eRRHvrIax5nqScymzISf7Q8XoE4jVZ97VTzv0PtbXmhPlT0Jm3AoLhJvuOBrZsfDIdDifCU9C+R3A7GA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1790797118; c=relaxed/simple; bh=BrEHxm3ReRcYc7xfk7Ghn6e6q/gX+nDR89qOeNL0CuA=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=bqSgfjgxrUUx+td8zTF2te5+GfdewwDxsV/Y6DoptxpTie0ziofwqnSmtV9+55ldovHahiCkz7WKnVoulF+wdTpzvLNbY2XdeRDt4qAr+ifSBNpmR3eUzXo8ry59MjTLXy/Ylscy9xwvdMVYmFF/FEF15xkAr6Da72pBtCGTLq0= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b=CS+ahSp/; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linuxfoundation.org header.i=@linuxfoundation.org header.b="CS+ahSp/" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8F8AD1F000FF; Wed, 30 Sep 2026 19:38:36 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linuxfoundation.org; s=korg; t=1790797117; bh=5/mnRrw4SNmtflv0jmzc89lsNks0TfQr1YVsNCUJrIw=; h=From:To:Cc:Subject:Date:In-Reply-To:References; b=CS+ahSp/LzYfk0GHo5zYrhB/aKl0dpSlu79iiTxNHbNfai/Mz4thCqGDcF9KiNgGG mngiO+KbtXgvD+U44fG8jnYpmL4ZAeX6K+wAuA2Xo5wapHNatK6PEIogj+vZWzjXSp fascTvC+ppvQgEESebrQLFd4qpn/VOnJXh4Ko/fM= From: Greg Kroah-Hartman To: stable@vger.kernel.org Cc: Greg Kroah-Hartman , patches@lists.linux.dev, "Darrick J. Wong" , Christoph Hellwig , Carlos Maiolino Subject: [PATCH 6.6 1154/1193] xfs: fix blockgc group quota scanning when usrquota isnt enforced Date: Wed, 30 Sep 2026 17:30:38 +0200 Message-ID: <20260930152459.879723367@linuxfoundation.org> X-Mailer: git-send-email 2.55.0 In-Reply-To: <20260930152434.301151190@linuxfoundation.org> References: <20260930152434.301151190@linuxfoundation.org> User-Agent: quilt/0.69 X-stable: review X-Patchwork-Hint: ignore Precedence: bulk X-Mailing-List: patches@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 6.6-stable review patch. If anyone has any objections, please let me know. ------------------ From: Darrick J. Wong commit f8f6382ff13109e19d0fc1d0224ff7d29641e56a upstream. LOLLM noticed the copy-paste error here -- if user quotas aren't enforced but we're near the group quota limit, we fail to set FLAG_GID and hence we might not actually free any preallocations, causing unnecessary EDQUOT. Fix that. Cc: stable@vger.kernel.org # v5.12 Fixes: c237dd7c709432 ("xfs: flush eof/cowblocks if we can't reserve quota for inode creation") Signed-off-by: Darrick J. Wong Assisted-by: LOLLM # finding obvious bugs Reviewed-by: Christoph Hellwig Signed-off-by: Carlos Maiolino Signed-off-by: Greg Kroah-Hartman --- fs/xfs/xfs_icache.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) --- a/fs/xfs/xfs_icache.c +++ b/fs/xfs/xfs_icache.c @@ -1550,7 +1550,7 @@ xfs_blockgc_free_dquots( do_work = true; } - if (XFS_IS_UQUOTA_ENFORCED(mp) && gdqp && xfs_dquot_lowsp(gdqp)) { + if (XFS_IS_GQUOTA_ENFORCED(mp) && gdqp && xfs_dquot_lowsp(gdqp)) { icw.icw_gid = make_kgid(mp->m_super->s_user_ns, gdqp->q_id); icw.icw_flags |= XFS_ICWALK_FLAG_GID; do_work = true;