Skip to contentSkip to conversation

erofs: call erofs_exit_ishare() before rcu_barrier()

PATCH In review Gao Xiang 2 participants 2 messages Jun 17 EROFS file system

lore
Share & tools
lore

Gao Xiang

author
#0 lore raw

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]>
---
 fs/erofs/super.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
fs/erofs/super.c +2 -2
index 802add6652fd..579443e6acfe 100644
@@ -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
Reviewed-by on v1 1/1
#1 lore raw
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]>

Thanks,
Hongbo

Quoted 22 lines
---
  fs/erofs/super.c | 4 ++--
  1 file changed, 2 insertions(+), 2 deletions(-)
fs/erofs/super.c +2 -2
index 802add6652fd..579443e6acfe 100644
@@ -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();