diff options
author | Austin Kim <austindh.kim@gmail.com> | 2019-09-06 04:08:50 +0300 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-09-06 07:36:12 +0300 |
commit | eb2e99943c5bd528af67516fbd9db0ad15e61611 (patch) | |
tree | 177a10a6580fb2e5ad38d11d049f827e890d1ba8 /fs/xfs | |
parent | bc56ad8c74b8588685c2875de0df8ab6974828ef (diff) | |
download | linux-eb2e99943c5bd528af67516fbd9db0ad15e61611.tar.xz |
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.c | 2 |
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; |