aboutsummaryrefslogtreecommitdiffstats
path: root/fs/xfs
diff options
context:
space:
mode:
authorDave Chinner <dchinner@redhat.com>2013-08-12 06:49:50 -0400
committerBen Myers <bpm@sgi.com>2013-08-12 17:57:51 -0400
commit63d20d6e3620898e67f80c813ec199b19b1674a9 (patch)
treefbb208b9564567019d9a50fcd5c7723a306799ec /fs/xfs
parent94b406091bb3fcbab3d846d7d273e30e5fc8ceb5 (diff)
xfs: kill __KERNEL__ check for debug code in allocation code
Userspace running debug builds is relatively rare, so there's need to special case the allocation algorithm code coverage debug switch. As it is, userspace defines random numbers to 0, so invert the logic of the switch so it is effectively a no-op in userspace. This kills another couple of __KERNEL__ users. Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Mark Tinguely <tinguely@sgi.com> Signed-off-by: Ben Myers <bpm@sgi.com>
Diffstat (limited to 'fs/xfs')
-rw-r--r--fs/xfs/xfs_alloc.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/fs/xfs/xfs_alloc.c b/fs/xfs/xfs_alloc.c
index 71596e57283a..5a1393f5e020 100644
--- a/fs/xfs/xfs_alloc.c
+++ b/fs/xfs/xfs_alloc.c
@@ -878,7 +878,7 @@ xfs_alloc_ag_vextent_near(
878 xfs_agblock_t ltnew; /* useful start bno of left side */ 878 xfs_agblock_t ltnew; /* useful start bno of left side */
879 xfs_extlen_t rlen; /* length of returned extent */ 879 xfs_extlen_t rlen; /* length of returned extent */
880 int forced = 0; 880 int forced = 0;
881#if defined(DEBUG) && defined(__KERNEL__) 881#ifdef DEBUG
882 /* 882 /*
883 * Randomly don't execute the first algorithm. 883 * Randomly don't execute the first algorithm.
884 */ 884 */
@@ -938,8 +938,8 @@ restart:
938 xfs_extlen_t blen=0; 938 xfs_extlen_t blen=0;
939 xfs_agblock_t bnew=0; 939 xfs_agblock_t bnew=0;
940 940
941#if defined(DEBUG) && defined(__KERNEL__) 941#ifdef DEBUG
942 if (!dofirst) 942 if (dofirst)
943 break; 943 break;
944#endif 944#endif
945 /* 945 /*