Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit b49a0c18 authored by Dave Chinner's avatar Dave Chinner Committed by Ben Myers
Browse files

xfs: remove __KERNEL__ from debug code



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: default avatarDave Chinner <dchinner@redhat.com>
Reviewed-by: default avatarMark Tinguely <tinguely@sgi.com>
Signed-off-by: default avatarBen Myers <bpm@sgi.com>
parent 63d20d6e
Loading
Loading
Loading
Loading
+1 −1
Original line number Original line Diff line number Diff line
@@ -127,7 +127,7 @@ static inline void xfs_bmap_init(xfs_bmap_free_t *flp, xfs_fsblock_t *fbp)
	{ BMAP_RIGHT_FILLING,	"RF" }, \
	{ BMAP_RIGHT_FILLING,	"RF" }, \
	{ BMAP_ATTRFORK,	"ATTR" }
	{ BMAP_ATTRFORK,	"ATTR" }


#if defined(__KERNEL) && defined(DEBUG)
#ifdef DEBUG
void	xfs_bmap_trace_exlist(struct xfs_inode *ip, xfs_extnum_t cnt,
void	xfs_bmap_trace_exlist(struct xfs_inode *ip, xfs_extnum_t cnt,
		int whichfork, unsigned long caller_ip);
		int whichfork, unsigned long caller_ip);
#define	XFS_BMAP_TRACE_EXLIST(ip,c,w)	\
#define	XFS_BMAP_TRACE_EXLIST(ip,c,w)	\
+2 −2
Original line number Original line Diff line number Diff line
@@ -331,7 +331,7 @@ xfs_dir2_data_freefind(
	xfs_dir2_data_free_t	*dfp;		/* bestfree entry */
	xfs_dir2_data_free_t	*dfp;		/* bestfree entry */
	xfs_dir2_data_aoff_t	off;		/* offset value needed */
	xfs_dir2_data_aoff_t	off;		/* offset value needed */
	struct xfs_dir2_data_free *bf;
	struct xfs_dir2_data_free *bf;
#if defined(DEBUG) && defined(__KERNEL__)
#ifdef DEBUG
	int			matched;	/* matched the value */
	int			matched;	/* matched the value */
	int			seenzero;	/* saw a 0 bestfree entry */
	int			seenzero;	/* saw a 0 bestfree entry */
#endif
#endif
@@ -339,7 +339,7 @@ xfs_dir2_data_freefind(
	off = (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr);
	off = (xfs_dir2_data_aoff_t)((char *)dup - (char *)hdr);
	bf = xfs_dir3_data_bestfree_p(hdr);
	bf = xfs_dir3_data_bestfree_p(hdr);


#if defined(DEBUG) && defined(__KERNEL__)
#ifdef DEBUG
	/*
	/*
	 * Validate some consistency in the bestfree table.
	 * Validate some consistency in the bestfree table.
	 * Check order, non-overlapping entries, and if we find the
	 * Check order, non-overlapping entries, and if we find the
+1 −1
Original line number Original line Diff line number Diff line
@@ -2147,7 +2147,7 @@ xfs_rtfree_extent(
	ASSERT(mp->m_rbmip->i_itemp != NULL);
	ASSERT(mp->m_rbmip->i_itemp != NULL);
	ASSERT(xfs_isilocked(mp->m_rbmip, XFS_ILOCK_EXCL));
	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.
	 * Check to see that this whole range is currently allocated.
	 */
	 */