On Sun, 25 Jan 2015 17:51:14 +0100
Jiri Olsa <[email protected]> wrote:

> On Sat, Jan 24, 2015 at 01:13:32PM -0500, Steven Rostedt wrote:
> 
> SNIP
> 
> > +static const char * const tracefs_known_mountpoints[] = {
> > +   TRACEFS_DEFAULT_PATH,
> > +   "/sys/kernel/debug/tracing",
> > +   "/tracing",
> > +   "/trace",
> > +   0,
> > +};
> > +
> > +static bool tracefs_found;
> > +
> > +/* find the path to the mounted tracefs */
> > +const char *tracefs_find_mountpoint(void)
> > +{
> > +   if (tracefs_found)
> > +           return (const char *)tracefs_mountpoint;
> > +
> > +   return find_mountpoint("tracefs", (long) TRACEFS_MAGIC,
> > +                          tracefs_mountpoint, PATH_MAX + 1,
> > +                          tracefs_known_mountpoints);
> > +}
> 
> also tracefs_found is not set 'true' in case we succeed..
> 

Thanks will fix. This is something that testing wouldn't catch, because
the tracefs_found (and debugfs_found) are just there to not try to
remount. Where here it would just refind where it is mounted. Thus, not
incorrect code, just inefficient code.

-- Steve
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Reply via email to