patch-2.4.26 linux-2.4.26/fs/xfs/xfs_error.c

Next file: linux-2.4.26/fs/xfs/xfs_fs.h
Previous file: linux-2.4.26/fs/xfs/xfs_dmops.c
Back to the patch index
Back to the overall index

diff -urN linux-2.4.25/fs/xfs/xfs_error.c linux-2.4.26/fs/xfs/xfs_error.c
@@ -218,13 +218,17 @@
 static void
 xfs_fs_vcmn_err(int level, xfs_mount_t *mp, char *fmt, va_list ap)
 {
-	char	*newfmt;
-	int	len = 16 + mp->m_fsname_len + strlen(fmt);
-
-	newfmt = kmem_alloc(len, KM_SLEEP);
-	sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt);
-	icmn_err(level, newfmt, ap);
-	kmem_free(newfmt, len);
+	if (mp != NULL) {
+		char	*newfmt;
+		int	len = 16 + mp->m_fsname_len + strlen(fmt);
+
+		newfmt = kmem_alloc(len, KM_SLEEP);
+		sprintf(newfmt, "Filesystem \"%s\": %s", mp->m_fsname, fmt);
+		icmn_err(level, newfmt, ap);
+		kmem_free(newfmt, len);
+	} else {
+		icmn_err(level, fmt, ap);
+	}
 }
 
 void
@@ -267,16 +271,10 @@
 	inst_t		*ra)
 {
 	if (level <= xfs_error_level) {
-		if (mp != NULL) {
-			xfs_cmn_err(XFS_PTAG_ERROR_REPORT,
-				    CE_ALERT, mp,
+		xfs_cmn_err(XFS_PTAG_ERROR_REPORT,
+			    CE_ALERT, mp,
 		"XFS internal error %s at line %d of file %s.  Caller 0x%p\n",
-				    tag, linenum, fname, ra);
-		} else {
-			cmn_err(CE_ALERT,
-		"XFS internal error %s at line %d of file %s.  Caller 0x%p\n",
-				tag, linenum, fname, ra);
-		}
+			    tag, linenum, fname, ra);
 
 		xfs_stack_trace();
 	}

FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)