]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs: remove __KERNEL__ from debug code
authorDave Chinner <dchinner@redhat.com>
Wed, 4 Sep 2013 22:05:41 +0000 (22:05 +0000)
committerRich Johnston <rjohnston@sgi.com>
Mon, 16 Sep 2013 20:14:45 +0000 (15:14 -0500)
There is no reason the remaining kernel-only debug code needs to
remain kernel-only. Kill the __KERNEL__ part of the defines, and let
userspace handle the debug code appropriately.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Mark Tinguely <tinguely@sgi.com>
Signed-off-by: Rich Johnston <rjohnston@sgi.com>
include/xfs_bmap.h
libxfs/xfs_dir2_data.c
libxfs/xfs_rtalloc.c

index 8b2fe9785b3a66d8217edd15ff07a139ae0d5a7e..33b41f35122574e0b1cf7ad7a2a9ae23ecfadddb 100644 (file)
@@ -127,7 +127,7 @@ static inline void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp)
        { BMAP_RIGHT_FILLING,   "RF" }, \
        { BMAP_ATTRFORK,        "ATTR" }
 
-#if defined(__KERNEL) && defined(DEBUG)
+#ifdef DEBUG
 void   xfs_bmap_trace_exlist(struct xfs_inode *ip, xfs_extnum_t cnt,
                int whichfork, unsigned long caller_ip);
 #define        XFS_BMAP_TRACE_EXLIST(ip,c,w)   \
index 064ddb2b390404f274288415fdaf23225a817327..5074878321f0797877a806292effd544aab79f89 100644 (file)
@@ -315,7 +315,7 @@ xfs_dir2_data_freefind(
        xfs_dir2_data_free_t    *dfp;           /* bestfree entry */
        xfs_dir2_data_aoff_t    off;            /* offset value needed */
        struct xfs_dir2_data_free *bf;
-#if defined(DEBUG) && defined(__KERNEL__)
+#ifdef DEBUG
        int                     matched;        /* matched the value */
        int                     seenzero;       /* saw a 0 bestfree entry */
 #endif
@@ -323,7 +323,7 @@ xfs_dir2_data_freefind(
        off = (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr);
        bf = xfs_dir3_data_bestfree_p(hdr);
 
-#if defined(DEBUG) && defined(__KERNEL__)
+#ifdef DEBUG
        /*
         * Validate some consistency in the bestfree table.
         * Check order, non-overlapping entries, and if we find the
index 9797db7fa00fe64c8a418717ba7bea18c60d62a0..f5a90b2ad8bba85677e1c31d1cac595211e02fd1 100644 (file)
@@ -735,7 +735,7 @@ xfs_rtfree_extent(
        ASSERT(mp->m_rbmip->i_itemp != NULL);
        ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
 
-#if defined(__KERNEL__) && defined(DEBUG)
+#ifdef DEBUG
        /*
         * Check to see that this whole range is currently allocated.
         */