On Fri, 2011-07-22 at 14:23 -0700, Chandra Seetharaman wrote:
> On Fri, 2011-07-22 at 14:49 -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@xxxxxxxxxx>
> > > Reviewed-by: Christoph Hellwig <hch@xxxxxx>
> >
> >
> > 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.
> >
> > I would personally prefer doing it that way though.
> >
> > /* NB: returns pointer to buffer reused on each call */
> > static inline char *
> > xfs_buf_target_name(struct xfs_buftarg *target)
> > {
> > static char __b[BDEVNAME_SIZE];
> >
> > return bdevname(target->bt_bdev, __b);
> > }
> >
> >
> > Anyway, you didn't change this, but you're touching
> > the code that uses it. So unless others object I
> > would like to see this changed along with the
> > rest of what you do here (which is all good, by
> > the way).
Will do it.
> >
> > Either way:
> >
> > Reviewed-by: Alex Elder <aelder@xxxxxxx>
> >
> >
>
|