diff --git a/fs/gfs2/ops_fstype.c b/fs/gfs2/ops_fstype.c index 9e0e9be1e41ddc4d973ca5515496401c3d97e77a..314c1134d12df623ff7c5713de0153ba0bf535f6 100644 --- a/fs/gfs2/ops_fstype.c +++ b/fs/gfs2/ops_fstype.c @@ -887,8 +887,10 @@ static int gfs2_get_sb_meta(struct file_system_type *fs_type, int flags, static void gfs2_kill_sb(struct super_block *sb) { - gfs2_delete_debugfs_file(sb->s_fs_info); - gfs2_meta_syncfs(sb->s_fs_info); + if (sb->s_fs_info) { + gfs2_delete_debugfs_file(sb->s_fs_info); + gfs2_meta_syncfs(sb->s_fs_info); + } kill_block_super(sb); }