From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from relay.sgi.com (relay3.corp.sgi.com [198.149.34.15]) by oss.sgi.com (Postfix) with ESMTP id B6F6A7F60 for ; Mon, 12 Aug 2013 05:50:49 -0500 (CDT) Received: from cuda.sgi.com (cuda2.sgi.com [192.48.176.25]) by relay3.corp.sgi.com (Postfix) with ESMTP id 477C0AC004 for ; Mon, 12 Aug 2013 03:50:49 -0700 (PDT) Received: from ipmail06.adl2.internode.on.net (ipmail06.adl2.internode.on.net [150.101.137.129]) by cuda.sgi.com with ESMTP id GC4eUOlG5R0y4JLC for ; Mon, 12 Aug 2013 03:50:47 -0700 (PDT) Received: from disappointment.disaster.area ([192.168.1.110] helo=disappointment) by dastard with esmtp (Exim 4.76) (envelope-from ) id 1V8phX-0004YT-9t for xfs@oss.sgi.com; Mon, 12 Aug 2013 20:50:15 +1000 Received: from dave by disappointment with local (Exim 4.80) (envelope-from ) id 1V8phX-00062r-8w for xfs@oss.sgi.com; Mon, 12 Aug 2013 20:50:15 +1000 From: Dave Chinner Subject: ***** SUSPECTED SPAM ***** [PATCH 30/50] xfs: remove __KERNEL__ from debug code Date: Mon, 12 Aug 2013 20:49:51 +1000 Message-Id: <1376304611-22994-31-git-send-email-david@fromorbit.com> In-Reply-To: <1376304611-22994-1-git-send-email-david@fromorbit.com> References: <1376304611-22994-1-git-send-email-david@fromorbit.com> List-Id: XFS Filesystem from SGI List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: xfs-bounces@oss.sgi.com Sender: xfs-bounces@oss.sgi.com To: xfs@oss.sgi.com From: Dave Chinner 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 Reviewed-by: Mark Tinguely --- fs/xfs/xfs_bmap.h | 2 +- fs/xfs/xfs_dir2_data.c | 4 ++-- fs/xfs/xfs_rtalloc.c | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/fs/xfs/xfs_bmap.h b/fs/xfs/xfs_bmap.h index 8b2fe97..33b41f3 100644 --- a/fs/xfs/xfs_bmap.h +++ b/fs/xfs/xfs_bmap.h @@ -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) \ diff --git a/fs/xfs/xfs_dir2_data.c b/fs/xfs/xfs_dir2_data.c index 4e1917d..98c23fa 100644 --- a/fs/xfs/xfs_dir2_data.c +++ b/fs/xfs/xfs_dir2_data.c @@ -331,7 +331,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 @@ -339,7 +339,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 diff --git a/fs/xfs/xfs_rtalloc.c b/fs/xfs/xfs_rtalloc.c index 4822806..6dbcb5e 100644 --- a/fs/xfs/xfs_rtalloc.c +++ b/fs/xfs/xfs_rtalloc.c @@ -2147,7 +2147,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. */ -- 1.8.3.2 _______________________________________________ xfs mailing list xfs@oss.sgi.com http://oss.sgi.com/mailman/listinfo/xfs