This is to avoid minor code duplication between fuse_kill_sb_anon() and
fuse_kill_sb_blk().
Signed-off-by: Miklos Szeredi <mszeredi@redhat.com>
 }
 EXPORT_SYMBOL_GPL(fuse_conn_destroy);
 
-static void fuse_kill_sb_anon(struct super_block *sb)
+static void fuse_sb_destroy(struct super_block *sb)
 {
        struct fuse_mount *fm = get_fuse_mount_super(sb);
        bool last;
                if (last)
                        fuse_conn_destroy(fm);
        }
+}
+
+static void fuse_kill_sb_anon(struct super_block *sb)
+{
+       fuse_sb_destroy(sb);
        kill_anon_super(sb);
 }
 
 #ifdef CONFIG_BLOCK
 static void fuse_kill_sb_blk(struct super_block *sb)
 {
-       struct fuse_mount *fm = get_fuse_mount_super(sb);
-       bool last;
-
-       if (fm) {
-               last = fuse_mount_remove(fm);
-               if (last)
-                       fuse_conn_destroy(fm);
-       }
+       fuse_sb_destroy(sb);
        kill_block_super(sb);
 }