Files
scoutfs/kmod
Auke Kok 66a90d1b9f Fix quota invalidate race with concurrent ruleset read
A quota check holding the quota cluster lock for READ sets the
cached ruleset to EBUSY while loading rules from the btree.  A
quota mod holding the same lock for WRITE then calls
scoutfs_quota_invalidate() and trips
BUG_ON(rs == ERR_PTR(-EBUSY)).  READ and WRITE cluster locks are
compatible on the same mount, so the BUG_ON's premise was wrong.

Drop the BUG_ON: the existing EINVAL swap already handles EBUSY
correctly.  Have the reader check the ruleset is still EBUSY before
installing its result so a racing invalidation wins and the stale
result is discarded.

Signed-off-by: Auke Kok <auke.kok@versity.com>
2026-04-30 17:41:34 -07:00
..