xfs: convert xfs_cmn_err to xfs_alert_tag
Continue the conversion of the old cmn_err interface be converting all the conditional panic tag errors to xfs_alert_tag() and then removing xfs_cmn_err(). Signed-off-by: Dave Chinner <dchinner@redhat.com> Reviewed-by: Alex Elder <aelder@sgi.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
This commit is contained in:

committed by
Dave Chinner

parent
a0fa2b679e
commit
6a19d9393a
@@ -64,34 +64,6 @@ xfs_fs_cmn_err(
|
||||
BUG_ON(strncmp(lvl, KERN_EMERG, strlen(KERN_EMERG)) == 0);
|
||||
}
|
||||
|
||||
/* All callers to xfs_cmn_err use CE_ALERT, so don't bother testing lvl */
|
||||
void
|
||||
xfs_cmn_err(
|
||||
int panic_tag,
|
||||
const char *lvl,
|
||||
struct xfs_mount *mp,
|
||||
const char *fmt,
|
||||
...)
|
||||
{
|
||||
struct va_format vaf;
|
||||
va_list args;
|
||||
int do_panic = 0;
|
||||
|
||||
if (xfs_panic_mask && (xfs_panic_mask & panic_tag)) {
|
||||
printk(KERN_ALERT "XFS: Transforming an alert into a BUG.");
|
||||
do_panic = 1;
|
||||
}
|
||||
|
||||
va_start(args, fmt);
|
||||
vaf.fmt = fmt;
|
||||
vaf.va = &args;
|
||||
|
||||
printk(KERN_ALERT "Filesystem %s: %pV", mp->m_fsname, &vaf);
|
||||
va_end(args);
|
||||
|
||||
BUG_ON(do_panic);
|
||||
}
|
||||
|
||||
void
|
||||
assfail(char *expr, char *file, int line)
|
||||
{
|
||||
|
@@ -33,8 +33,6 @@ void cmn_err(const char *lvl, const char *fmt, ...)
|
||||
__attribute__ ((format (printf, 2, 3)));
|
||||
void xfs_fs_cmn_err( const char *lvl, struct xfs_mount *mp,
|
||||
const char *fmt, ...) __attribute__ ((format (printf, 3, 4)));
|
||||
void xfs_cmn_err( int panic_tag, const char *lvl, struct xfs_mount *mp,
|
||||
const char *fmt, ...) __attribute__ ((format (printf, 4, 5)));
|
||||
|
||||
extern void assfail(char *expr, char *f, int l);
|
||||
|
||||
|
Reference in New Issue
Block a user