[PATCH 12/12] xfs: Remove the macro XFS_BUFTARG_NAME
Christoph Hellwig
hch at infradead.org
Sun Jul 24 06:37:24 CDT 2011
On Fri, Jul 22, 2011 at 02:49:41PM -0500, Alex Elder wrote:
> On Thu, 2011-07-21 at 17:34 -0700, Chandra Seetharaman wrote:
> > Remove the definition and usages of the macro XFS_BUFTARG_NAME.
> >
> > Signed-off-by: Chandra Seetharaman <sekharan at us.ibm.com>
> > Reviewed-by: Christoph Hellwig <hch at lst.de>
>
>
> Wow, I hadn't looked at the definition of
> xfs_buf_target_name() before. It's not safe
> (using a pointer to since-released stack space),
> though in practice it's going to be fine.
>
> Defining it as an inline function with a static
> buffer would at least avoid that, though it
> means it's not reentrant either.
IMHO the right fix is to just kill it off entirely. All XFS messages
now have the filesystem name prefixed to them, and while we can have
up to three devices, all these error messages can only hit either
the main or the log device, and it's obvious from the context which
one we did hit.
More information about the xfs
mailing list