Re: [PATCH 3/6] xfs: make the assertion message functions take a mount parameter

Darrick J. Wong
2019-11-05T01:08:26Z

On Mon, Nov 04, 2019 at 04:45:44PM -0800, Christoph Hellwig wrote:
> > void
> > -asswarn(char *expr, char *file, int line)
> > +asswarn(struct xfs_mount *mp, char *expr, char *file, int line)
> > {
> > - xfs_warn(NULL, "Assertion failed: %s, file: %s, line: %d",
> > + xfs_warn(mp, "Assertion failed: %s, file: %s, line: %d",
> > expr, file, line);
> > WARN_ON(1);
> > }
> >
> > void
> > -assfail(char *expr, char *file, int line)
> > +assfail(struct xfs_mount *mp, char *expr, char *file, int line)
>
> Might be worth to change it to our usual prototype style while you're
> at it.
>
> > -extern void assfail(char *expr, char *f, int l);
> > -extern void asswarn(char *expr, char *f, int l);
> > +extern void assfail(struct xfs_mount *mp, char *expr, char *f, int l);
> > +extern void asswarn(struct xfs_mount *mp, char *expr, char *f, int l);
>
> And drop the pointless externs?
>
> Otherwise this looks sane to me.

Fixed both of those.

--D