aboutsummaryrefslogtreecommitdiffstats
path: root/fs
diff options
context:
space:
mode:
authorAmir Goldstein <amir73il@gmail.com>2017-02-02 02:55:58 -0500
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2017-02-04 03:47:11 -0500
commit624e54b5aff15c6d49974f404c5cef5ce7f89cd0 (patch)
tree9d6891c5a0485b9b7b23174f26310da71a30542f /fs
parent4f4d5082ec73f6e0bd44a8eccbef440b96f46a98 (diff)
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')
-rw-r--r--fs/xfs/xfs_linux.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index 68640fb63a54..1455b25205a8 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)
330} 330}
331 331
332#define ASSERT_ALWAYS(expr) \ 332#define ASSERT_ALWAYS(expr) \
333 (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 333 (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
334 334
335#ifdef DEBUG 335#ifdef DEBUG
336#define ASSERT(expr) \ 336#define ASSERT(expr) \
337 (unlikely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__)) 337 (likely(expr) ? (void)0 : assfail(#expr, __FILE__, __LINE__))
338 338
339#ifndef STATIC 339#ifndef STATIC
340# define STATIC noinline 340# define STATIC noinline
@@ -345,7 +345,7 @@ static inline __uint64_t howmany_64(__uint64_t x, __uint32_t y)
345#ifdef XFS_WARN 345#ifdef XFS_WARN
346 346
347#define ASSERT(expr) \ 347#define ASSERT(expr) \
348 (unlikely(expr) ? (void)0 : asswarn(#expr, __FILE__, __LINE__)) 348 (likely(expr) ? (void)0 : asswarn(#expr, __FILE__, __LINE__))
349 349
350#ifndef STATIC 350#ifndef STATIC
351# define STATIC static noinline 351# define STATIC static noinline