nilfs2: convert BUG_ON() in nilfs_finish_roll_forward() to WARN_ON()
authorRyusuke Konishi <konishi.ryusuke@gmail.com>
Wed, 8 May 2024 22:14:29 +0000 (07:14 +0900)
committerAndrew Morton <akpm@linux-foundation.org>
Sat, 11 May 2024 22:51:44 +0000 (15:51 -0700)
commit0a73eac1ed10097d1799c10dff2172605fd40c75
treee64076d31795400083f8aee785cde6355227047c
parentb1be5844c1a0124a49a30a20a189d0a53aa10578
nilfs2: convert BUG_ON() in nilfs_finish_roll_forward() to WARN_ON()

The BUG_ON check performed on the return value of __getblk() in
nilfs_finish_roll_forward() assumes that a buffer that has been
successfully read once is retrieved with the same parameters and does not
fail (__getblk() does not return an error due to memory allocation
failure).  Also, nilfs_finish_roll_forward() is called at most once during
mount.

Taking these into consideration, rewrite the check to use WARN_ON() to
avoid using BUG_ON().

Link: https://lkml.kernel.org/r/20240508221429.7559-1-konishi.ryusuke@gmail.com
Signed-off-by: Ryusuke Konishi <konishi.ryusuke@gmail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
fs/nilfs2/recovery.c