xfs: teach error reporting functions to take xfs_failaddr_t
authorDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Jan 2018 18:51:25 +0000 (10:51 -0800)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 8 Jan 2018 18:54:47 +0000 (10:54 -0800)
Convert the two other error reporting functions to take xfs_failaddr_t
when the caller wishes to capture a code pointer instead of the classic
void * pointer.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
fs/xfs/xfs_error.c
fs/xfs/xfs_error.h

index 21db07cc7a11f8289d91cf97d0d88db686907d94..be1211a851dce82e83b05e369e5b4f6bf28419d1 100644 (file)
@@ -314,12 +314,12 @@ xfs_error_report(
        struct xfs_mount        *mp,
        const char              *filename,
        int                     linenum,
-       void                    *ra)
+       xfs_failaddr_t          failaddr)
 {
        if (level <= xfs_error_level) {
                xfs_alert_tag(mp, XFS_PTAG_ERROR_REPORT,
                "Internal error %s at line %d of file %s.  Caller %pS",
-                           tag, linenum, filename, ra);
+                           tag, linenum, filename, failaddr);
 
                xfs_stack_trace();
        }
@@ -333,11 +333,11 @@ xfs_corruption_error(
        void                    *p,
        const char              *filename,
        int                     linenum,
-       void                    *ra)
+       xfs_failaddr_t          failaddr)
 {
        if (level <= xfs_error_level)
                xfs_hex_dump(p, 64);
-       xfs_error_report(tag, level, mp, filename, linenum, ra);
+       xfs_error_report(tag, level, mp, filename, linenum, failaddr);
        xfs_alert(mp, "Corruption detected. Unmount and run xfs_repair");
 }
 
index 11f80e072403811c37be2575890baff381efe4ce..f086040266ac49174e659ba9b6672a116b6b65db 100644 (file)
 struct xfs_mount;
 
 extern void xfs_error_report(const char *tag, int level, struct xfs_mount *mp,
-                       const char *filename, int linenum, void *ra);
+                       const char *filename, int linenum,
+                       xfs_failaddr_t failaddr);
 extern void xfs_corruption_error(const char *tag, int level,
                        struct xfs_mount *mp, void *p, const char *filename,
-                       int linenum, void *ra);
+                       int linenum, xfs_failaddr_t failaddr);
 extern void xfs_verifier_error(struct xfs_buf *bp, int error,
                        xfs_failaddr_t failaddr);