diff options
| author | Amir Goldstein <amir73il@gmail.com> | 2017-01-17 14:41:41 -0500 |
|---|---|---|
| committer | Darrick J. Wong <darrick.wong@oracle.com> | 2017-01-17 14:41:41 -0500 |
| commit | bf46ecc3d8cca05f2907cf482755c42c2b11a79d (patch) | |
| tree | af4105446207e65bc0868b93f2edb4d9fa5f35b6 /fs | |
| parent | 49def1853334396f948dcb4cedb9347abb318df5 (diff) | |
xfs: make the ASSERT() condition likely
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>
Diffstat (limited to 'fs')
| -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 e467218c0098..7a989de224f4 100644 --- a/fs/xfs/xfs_linux.h +++ b/fs/xfs/xfs_linux.h | |||
| @@ -331,11 +331,11 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y) | |||
| 331 | } | 331 | } |
| 332 | 332 | ||
| 333 | #define ASSERT_ALWAYS(expr) \ | 333 | #define ASSERT_ALWAYS(expr) \ |
| 334 | (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) | 334 | (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) |
| 335 | 335 | ||
| 336 | #ifdef DEBUG | 336 | #ifdef DEBUG |
| 337 | #define ASSERT(expr) \ | 337 | #define ASSERT(expr) \ |
| 338 | (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) | 338 | (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) |
| 339 | 339 | ||
| 340 | #ifndef STATIC | 340 | #ifndef STATIC |
| 341 | # define STATIC noinline | 341 | # define STATIC noinline |
| @@ -346,7 +346,7 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y) | |||
| 346 | #ifdef XFS_WARN | 346 | #ifdef XFS_WARN |
| 347 | 347 | ||
| 348 | #define ASSERT(expr) \ | 348 | #define ASSERT(expr) \ |
| 349 | (unlikely(expr) ? (void)0 : asswarn(#expr, __FILE__, __LINE__)) | 349 | (likely(expr) ? (void)0 : asswarn(#expr, __FILE__, __LINE__)) |
| 350 | 350 | ||
| 351 | #ifndef STATIC | 351 | #ifndef STATIC |
| 352 | # define STATIC static noinline | 352 | # define STATIC static noinline |
