From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-yx1-f44.google.com (mail-yx1-f44.google.com [74.125.224.44]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id E5FA83112BD for ; Sat, 27 Jun 2026 22:40:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=74.125.224.44 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782600006; cv=none; b=qlxyIeo4Ev2v+HDiZGI5jEzC5TGSNHeozngSq73Q7tfhfAfc5YFbBa4JE+aHFc4FlUFALKPWmW4L3NIQ+JkXAMimjhK1CAAFKz+9JEmcgkZyEMgzOn6zPXSMJogfQhLLGjwiRtiFC0m417MTwms9wsvdFSj2b+nD7YCZBOw3TZ8= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1782600006; c=relaxed/simple; bh=msqn/sn/3OXNeRY6E2eJhfO3k+zQJ3cdVyMfYv3wnhY=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=DFlNURbegvJe08Vct5lfc2U0snc0my1i8+5j2VTCEXQa0tDBAlJrniOC3oWBYeSdAlkd2tjLQvBDzj+zjcKXWWJ4N/fp0jic4aIPCRo8BYLZVHHVeDjrvbQH5VT/ngwZqeg0t9omNseshSVM6vTUcc7lEEG5khOeUefNdhxTd9g= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com; spf=pass smtp.mailfrom=gmail.com; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b=TB6u0JvS; arc=none smtp.client-ip=74.125.224.44 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=gmail.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gmail.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="TB6u0JvS" Received: by mail-yx1-f44.google.com with SMTP id 956f58d0204a3-664cc921e55so5455d50.2 for ; Sat, 27 Jun 2026 15:40:04 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20251104; t=1782600004; x=1783204804; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to:content-type; bh=LqCZxaZvrdNqF5u+99gx4CKQLMyqgqiSQusoPYhSc+I=; b=TB6u0JvSl7w2sKIppCLiueXRvOYysRtpkfXd9CgfZ6+4A3GkJMPODmV1WljnNcNgyk ZARJWOueOF4Ef3d2ChBI8M8WY6V+wTagoppHYnHfan+/0hYuUlaeQ2KM1Ehvy1OVK9EL J+rrkeDckHX/Mevkpe8NChHipIDWbE2aktRWbjltvbh040stemeuVepTTinGvKrVfHDn YXoR7AZMnIY7QhK8B1slpP5BmpER9pexC8kjApaGFQNmZ2bbz8n8m1/cSRyDtfNIlY1R 3nqVesdhXnpQKI24dAG/VFGrqpNeq1iuoM8T9Z0kPZfeyjDUa2YwJKSBwcOLMCZi0ERh ADVg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1782600004; x=1783204804; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-gg:x-gm-message-state:from:to:cc:subject:date :message-id:reply-to:content-type; bh=LqCZxaZvrdNqF5u+99gx4CKQLMyqgqiSQusoPYhSc+I=; b=fRrIUeVO8Rqg210TzfBbXQONflrRXFUXuww6MR/v9Vc31FtyqrKiENUgzMLNwFk6/M ivKJE+duiWS4TCsp8/ZhZCMZ8p72qboekKAgZqmgUXLvp7kK/iR7VILC1KrbODmmYwTz agELN+mF0DxeLnd/ccuf/9wpzR2aZAPiy70aUaNXfBTUpuADEm/Ag9tguZgBNIgLCOSG SmO95PhUbqEN9vrMhLi4T1tgQ9RylGJSWBivZkrfR9mTFdSF6m0n+JtbOJRktnxn+IPu W0vxNgUh6S08/ChLUHdh2T4Adg4sEPN+cNWxgWKCPaQ2HKEJA7Ht6/XkmH7RqSYfF2fb WR2w== X-Forwarded-Encrypted: i=1; AHgh+RpidyNbEvhkUCLSuSdEHyTHcNzZM68D6nu8vol/t8hkSKAAiiPhns7h1pH/rBj4sEKIpLeGrhimnREygUU=@vger.kernel.org X-Gm-Message-State: AOJu0YzOCwuxo3qbn9KIFJFkzmdmG9YIKT99XBMR0MArPK9HDeO8vZC9 mFSR6/NrwFmRLafB5OB+/w2mCQYvDJTyRkEL65XJJsVnwuMhEQHF6WLkV3ixmPbn X-Gm-Gg: AfdE7ck3bzF/8gtImDfiLRT7rYzHLXTJUegnqG4M9HkZ7xcxCuKsq1+Kx51EBeOVqWq dq5qNesKnFEum5cSU7LqWECMTBsX1bTiiwss3STxm5E8kyoDruKvsIQdEkw3ZxmHsUgl+/MTxNZ VuxcFx5zB5azF/08R3NaF3pI197EennMrlBU47b0+//t8hs3mcraJntVgWmBNCwswbwT/8aB/vQ Imhfkpqft+s/Z8zeqj7HqcMpu258Gu1ZrF/4lMW1ahtEyymXLSc5Y4rPyZMPIZlMYJN9PadNIzF 0UT4tE26AZMVNffE/JbL7mS2C5rcKkdqqh9ldK3BOOUyLtGqxu16Hgc/wOO4iXOYxI8WEFiX+M6 xXGEurNp/GsGF7Gc8Q+80XGP7VUHrTbK2440F748B2WwnXEoz+e5nPrRHrOIT750/sXKZwsQPGi 54bjCN+HQBsqsr/saQRbXU68ecT9dAad/sZ5JyIGSZ48SIFq751QifdqmRwMm2IOcTObs= X-Received: by 2002:a05:690e:14c4:b0:664:82f9:fbe with SMTP id 956f58d0204a3-66487f2b097mr7942801d50.7.1782600003905; Sat, 27 Jun 2026 15:40:03 -0700 (PDT) Received: from tc-ROG-Strix-G733ZX.lan ([2603:6080:ef0:67b0:8953:b27b:7fc9:19fa]) by smtp.gmail.com with ESMTPSA id 956f58d0204a3-664ae75ff82sm2082024d50.12.2026.06.27.15.40.02 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 27 Jun 2026 15:40:03 -0700 (PDT) From: Tsu-chieh Chen To: Carlos Maiolino Cc: linux-xfs@vger.kernel.org, linux-kernel@vger.kernel.org, Tsu-chieh Chen Subject: [PATCH] xfs: clarify sb_qflags locking in xfs_qm_mount_quotas Date: Sat, 27 Jun 2026 18:39:10 -0400 Message-ID: <20260627223910.129798-1-tsuchieh.chen@gmail.com> X-Mailer: git-send-email 2.43.0 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit xfs_qm_mount_quotas() is only called from the mount path, so m_sb_lock is not needed for serialization when updating sb_qflags. The code still takes m_sb_lock around the sb_qflags update. Replace the old XXX comment with an explanation that the lock is taken to keep the mount-time update consistent with the runtime quota update paths. No functional change. Signed-off-by: Tsu-chieh Chen --- fs/xfs/xfs_qm.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/fs/xfs/xfs_qm.c b/fs/xfs/xfs_qm.c index aa0d2976f1c3..c2bab12643d3 100644 --- a/fs/xfs/xfs_qm.c +++ b/fs/xfs/xfs_qm.c @@ -1663,8 +1663,9 @@ xfs_qm_mount_quotas( write_changes: /* - * We actually don't have to acquire the m_sb_lock at all. - * This can only be called from mount, and that's single threaded. XXX + * Mount is single-threaded, so this does not need m_sb_lock for + * serialization. Take it anyway to keep sb_qflags updates consistent + * with the runtime quota update paths. */ spin_lock(&mp->m_sb_lock); sbf = mp->m_sb.sb_qflags; base-commit: 804826eac53cff44f88f42989fcc601c2612c0ed -- 2.43.0