summaryrefslogtreecommitdiff
path: root/fs/xfs
diff options
context:
space:
mode:
authorAustin Kim <austindh.kim@gmail.com>2019-09-05 18:08:50 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2019-09-05 21:36:12 -0700
commiteb2e99943c5bd528af67516fbd9db0ad15e61611 (patch)
tree177a10a6580fb2e5ad38d11d049f827e890d1ba8 /fs/xfs
parentbc56ad8c74b8588685c2875de0df8ab6974828ef (diff)
xfs: Use WARN_ON_ONCE for bailout mount-operation
If the CONFIG_BUG is enabled, BUG is executed and then system is crashed. However, the bailout for mount is no longer proceeding. Using WARN_ON_ONCE rather than BUG can prevent this situation. Signed-off-by: Austin Kim <austindh.kim@gmail.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_mount.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/xfs/xfs_mount.c b/fs/xfs/xfs_mount.c
index da50b12ef634..ba5b6f3b2b88 100644
--- a/fs/xfs/xfs_mount.c
+++ b/fs/xfs/xfs_mount.c
@@ -214,7 +214,7 @@ xfs_initialize_perag(
spin_lock(&mp->m_perag_lock);
if (radix_tree_insert(&mp->m_perag_tree, index, pag)) {
- BUG();
+ WARN_ON_ONCE(1);
spin_unlock(&mp->m_perag_lock);
radix_tree_preload_end();
error = -EEXIST;