xfs: remove unlikely() from WARN_ON() condition

"unlikely(WARN_ON(x))" is excessive. WARN_ON() already uses unlikely()
internally.

Link: http://lkml.kernel.org/r/20190829165025.15750-7-efremov@linux.com
Signed-off-by: Denis Efremov <efremov@linux.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Cc: Joe Perches <joe@perches.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
Denis Efremov 2019-09-25 16:49:37 -07:00 committed by Linus Torvalds
parent 77c0e745bd
commit 14ed868807
1 changed files with 2 additions and 2 deletions

View File

@ -2097,7 +2097,7 @@ xfs_verify_magic(
int idx; int idx;
idx = xfs_sb_version_hascrc(&mp->m_sb); idx = xfs_sb_version_hascrc(&mp->m_sb);
if (unlikely(WARN_ON(!bp->b_ops || !bp->b_ops->magic[idx]))) if (WARN_ON(!bp->b_ops || !bp->b_ops->magic[idx]))
return false; return false;
return dmagic == bp->b_ops->magic[idx]; return dmagic == bp->b_ops->magic[idx];
} }
@ -2115,7 +2115,7 @@ xfs_verify_magic16(
int idx; int idx;
idx = xfs_sb_version_hascrc(&mp->m_sb); idx = xfs_sb_version_hascrc(&mp->m_sb);
if (unlikely(WARN_ON(!bp->b_ops || !bp->b_ops->magic16[idx]))) if (WARN_ON(!bp->b_ops || !bp->b_ops->magic16[idx]))
return false; return false;
return dmagic == bp->b_ops->magic16[idx]; return dmagic == bp->b_ops->magic16[idx];
} }