mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-07 11:10:44 +00:00
scoutfs: destroy items after locks
We were destroying the item subsystem before shutting down locking. This is wrong because locking shutdown invalidates items covered by the locks. It can walk into freed memory and crash or corrupt other memory. The fix is to tear down the item subsystem after tearing down locks. Signed-off-by: Zach Brown <zab@versity.com>
This commit is contained in:
@@ -129,7 +129,6 @@ static void scoutfs_put_super(struct super_block *sb)
|
||||
scoutfs_shutdown_trans(sb);
|
||||
scoutfs_client_destroy(sb);
|
||||
scoutfs_inode_destroy(sb);
|
||||
scoutfs_item_destroy(sb);
|
||||
|
||||
/* the server locks the listen address and compacts */
|
||||
scoutfs_lock_shutdown(sb);
|
||||
@@ -138,6 +137,7 @@ static void scoutfs_put_super(struct super_block *sb)
|
||||
scoutfs_seg_destroy(sb);
|
||||
scoutfs_lock_destroy(sb);
|
||||
|
||||
scoutfs_item_destroy(sb);
|
||||
scoutfs_destroy_triggers(sb);
|
||||
scoutfs_options_destroy(sb);
|
||||
debugfs_remove(sbi->debug_root);
|
||||
|
||||
Reference in New Issue
Block a user