erofs: call erofs_exit_ishare() before rcu_barrier()
PATCH 1/1 erofs: call erofs_exit_ishare() before rcu_barrier()
Ensure all inode free callbacks have completed before destroying the inode slab cache.
Fixes 5ef3208e3be5 ("erofs: introduce the page cache share feature")
Cc Hongbo Li <[email protected]>
Signed-off-by Gao Xiang <[email protected]>
--- fs/erofs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
fs/erofs/super.c +2 -2
@@ -1048,11 +1048,11 @@ static int __init erofs_module_init(void) 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 ();
Signature · 1 line
2.43.5
Quoted 6 lines · Gao Xiang
Ensure all inode free callbacks have completed before destroying the inode slab cache.
Fixes 5ef3208e3be5 ("erofs: introduce the page cache share feature")Cc Hongbo Li <[email protected]>Signed-off-by Gao Xiang <[email protected]>
Reviewed-by Hongbo Li <[email protected]>
Thanks,
Hongbo
Quoted 22 lines
--- fs/erofs/super.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)fs/erofs/super.c +2
-2@@ -1048,11 +1048,11 @@ static int __init erofs_module_init(void) 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 ();