diff options
author | Amir Goldstein <amir73il@gmail.com> | 2017-02-02 07:55:58 (GMT) |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2017-02-04 08:47:11 (GMT) |
commit | 624e54b5aff15c6d49974f404c5cef5ce7f89cd0 (patch) | |
tree | 9d6891c5a0485b9b7b23174f26310da71a30542f /fs/xfs | |
parent | 4f4d5082ec73f6e0bd44a8eccbef440b96f46a98 (diff) | |
download | linux-624e54b5aff15c6d49974f404c5cef5ce7f89cd0.tar.xz |
xfs: make the ASSERT() condition likely
commit bf46ecc3d8cca05f2907cf482755c42c2b11a79d upstream.
The ASSERT() condition is the normal case, not the exception,
so testing the condition should be likely(), not unlikely().
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Amir Goldstein <amir73il@gmail.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/xfs')
-rw-r--r-- | fs/xfs/xfs_linux.h | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h index 68640fb..1455b2520 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h @@ -330,11 +330,11 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y) } #define ASSERT_ALWAYS(expr) \ - (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) + (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) #ifdef DEBUG #define ASSERT(expr) \ - (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) + (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) #ifndef STATIC # define STATIC noinline @@ -345,7 +345,7 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y) #ifdef XFS_WARN #define ASSERT(expr) \ - (unlikely(expr) ? (void)0 : asswarn(#expr, __FILE__, __LINE__)) + (likely(expr) ? (void)0 : asswarn(#expr, __FILE__, __LINE__)) #ifndef STATIC # define STATIC static noinline |