mirror of
https://github.com/versity/scoutfs.git
synced 2026-05-01 18:35:43 +00:00
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>