]> git.ipfire.org Git - thirdparty/linux.git/commitdiff
erofs: call erofs_exit_ishare() before rcu_barrier()
authorGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 17 Jun 2026 03:14:59 +0000 (11:14 +0800)
committerGao Xiang <hsiangkao@linux.alibaba.com>
Wed, 17 Jun 2026 04:01:34 +0000 (12:01 +0800)
Ensure all inode free callbacks have completed before
destroying the inode slab cache.

Fixes: 5ef3208e3be5 ("erofs: introduce the page cache share feature")
Reviewed-by: Hongbo Li <lihongbo22@huawei.com>
Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
fs/erofs/super.c

index 802add6652fda631ffef6814536274cae9b2fc4b..579443e6acfeb68d18992a40284e555046718605 100644 (file)
@@ -1048,11 +1048,11 @@ shrinker_err:
 static void __exit erofs_module_exit(void)
 {
        unregister_filesystem(&erofs_fs_type);
+       erofs_exit_ishare();
 
-       /* Ensure all RCU free inodes / pclusters are safe to be destroyed. */
+       /* ensure all delayed rcu free inodes & pclusters are flushed */
        rcu_barrier();
 
-       erofs_exit_ishare();
        erofs_exit_sysfs();
        z_erofs_exit_subsystem();
        erofs_exit_shrinker();