summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_linux.h
diff options
context:
space:
mode:
authorDarrick J. Wong2017-10-18 06:37:33 +0200
committerDarrick J. Wong2017-10-27 00:38:23 +0200
commit52c732eee78b47ac2eb828b1c7fa611cd37b0090 (patch)
treeb84f6d406680b3bb5a9b6de2d70ab7c1dfe04993 /fs/xfs/xfs_linux.h
parentxfs: refactor btree pointer checks (diff)
downloadkernel-qcow2-linux-52c732eee78b47ac2eb828b1c7fa611cd37b0090.tar.gz
kernel-qcow2-linux-52c732eee78b47ac2eb828b1c7fa611cd37b0090.tar.xz
kernel-qcow2-linux-52c732eee78b47ac2eb828b1c7fa611cd37b0090.zip
xfs: refactor btree block header checking functions
Refactor the btree block header checks to have an internal function that returns the address of the failing check without logging errors. The scrubber will call the internal function, while the external version will maintain the current logging behavior. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/xfs_linux.h')
-rw-r--r--fs/xfs/xfs_linux.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/xfs_linux.h b/fs/xfs/xfs_linux.h
index dcd1292664b3..00a5efeec496 100644
--- a/fs/xfs/xfs_linux.h
+++ b/fs/xfs/xfs_linux.h
@@ -142,6 +142,13 @@ typedef __u32 xfs_nlink_t;
#define SYNCHRONIZE() barrier()
#define __return_address __builtin_return_address(0)
+/*
+ * Return the address of a label. Use barrier() so that the optimizer
+ * won't reorder code to refactor the error jumpouts into a single
+ * return, which throws off the reported address.
+ */
+#define __this_address ({ __label__ __here; __here: barrier(); &&__here; })
+
#define XFS_PROJID_DEFAULT 0
#define MIN(a,b) (min(a,b))