mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-26 01:52:57 +00:00
15becd6ef8a17ee954fa86e3890bdfa9d69b974c
Usually lock_free() is called as users finish using a lock and when its state shows that it is idle and won't be freed out from under another use. During shutdown we manually call lock_free() on all locks because shutdown promises that there will be no more lock users, including networking callbacks. But there is a case where network requests can be pending and we shutdown before waiting for their reply. This trips BUG_ON assertions in lock_free() that would otherwise catch unsafe calls of lock_free(). This is easiest to reproduce by interrupting a mount (which is waiting on a lock to read the root inode). The fix is to update each lock's state during shutdown to reflect the promise made by shutdown. Requests aren't actually pending because we've shutdown networking befrore getting here. Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
6.9 MiB
Languages
C
86.3%
Shell
10%
Roff
2.5%
TeX
0.8%
Makefile
0.4%