Quoting Tejun Heo (t...@kernel.org):
> Hello, Serge.
>
> On Tue, Aug 09, 2016 at 10:33:05AM -0500, Serge E. Hallyn wrote:
> > > + for (i = depth_to - 1; i >= 0; i--) {
> > > + for (kn = kn_to, j = 0; j < i; j++)
> > > + kn = kn->parent;
> >
> > This is O(n^2) where n is th
Hello, Serge.
On Tue, Aug 09, 2016 at 10:33:05AM -0500, Serge E. Hallyn wrote:
> > + for (i = depth_to - 1; i >= 0; i--) {
> > + for (kn = kn_to, j = 0; j < i; j++)
> > + kn = kn->parent;
>
> This is O(n^2) where n is the path depth. It's not a hot path, though, do
Quoting Tejun Heo (t...@kernel.org):
> kernfs_path*() functions always return the length of the full path but
> the path content is undefined if the length is larger than the
> provided buffer. This makes its behavior different from strlcpy() and
> requires error handling in all its users even whe
kernfs_path*() functions always return the length of the full path but
the path content is undefined if the length is larger than the
provided buffer. This makes its behavior different from strlcpy() and
requires error handling in all its users even when they don't care
about truncation. In addit
4 matches
Mail list logo