--- x/fs/super.c
+++ y/fs/super.c
@@ -451,15 +451,6 @@ void deactivate_locked_super(struct supe
struct file_system_type *fs = s->s_type;
if (atomic_dec_and_test(&s->s_active)) {
unregister_shrinker(&s->s_shrink);
- fs->kill_sb(s);
-
- /*
- * Since list_lru_destroy() may sleep, we cannot call it from
- * put_super(), where we hold the sb_lock. Therefore we destroy
- * the lru lists right now.
- */
- list_lru_destroy(&s->s_dentry_lru);
- list_lru_destroy(&s->s_inode_lru);
/*
* Remove it from @fs_supers so it isn't found by new
@@ -472,6 +463,15 @@ void deactivate_locked_super(struct supe
hlist_del_init(&s->s_instances);
spin_unlock(&sb_lock);
+ fs->kill_sb(s);
+
+ /*
+ * Since list_lru_destroy() may sleep, we cannot call it from
+ * put_super(), where we hold the sb_lock. Therefore we destroy
+ * the lru lists right now.
+ */
+ list_lru_destroy(&s->s_dentry_lru);
+ list_lru_destroy(&s->s_inode_lru);
/*
* Let concurrent mounts know that this thing is really dead.
* We don't need @sb->s_umount here as every concurrent caller