Skip to content

Commit

Permalink
erofs: drop unnecessary WARN_ON() in erofs_kill_sb()
Browse files Browse the repository at this point in the history
Previously, .kill_sb() will be called only after fill_super fails.
It will be changed [1].

Besides, checking for s_magic in erofs_kill_sb() is unnecessary from
any point of view.  Let's get rid of it now.

[1] https://lore.kernel.org/r/20230731-flugbereit-wohnlage-78acdf95ab7e@brauner

Signed-off-by: Gao Xiang <hsiangkao@linux.alibaba.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Acked-by: Christian Brauner <brauner@kernel.org>
Link: https://lore.kernel.org/r/20230801014737.28614-1-hsiangkao@linux.alibaba.com
  • Loading branch information
Gao Xiang committed Aug 1, 2023
1 parent 94c43de commit 4da3c71
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions fs/erofs/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -889,8 +889,6 @@ static void erofs_kill_sb(struct super_block *sb)
{
struct erofs_sb_info *sbi;

WARN_ON(sb->s_magic != EROFS_SUPER_MAGIC);

/* pseudo mount for anon inodes */
if (sb->s_flags & SB_KERNMOUNT) {
kill_anon_super(sb);
Expand Down

0 comments on commit 4da3c71

Please sign in to comment.