On Tuesday 2015-11-17 22:20, David Miller wrote:
>> +static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */
>> +int len = strlen(path);
> ...
>> +if (len >= PATH_MAX)
>> +return NULL;
>> +
>> +memcpy(path_buf, path, len + 1);
>
> static char path_buf[PATH
On Tue, Nov 17, 2015 at 04:20:40PM -0500, David Miller wrote:
> From: Tejun Heo
> Date: Tue, 17 Nov 2015 14:40:37 -0500
>
> > + static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */
> > + int len = strlen(path);
> ...
> > + if (len >= PATH_MAX)
> > + return NULL;
> > +
From: Tejun Heo
Date: Tue, 17 Nov 2015 14:40:37 -0500
> + static char path_buf[PATH_MAX]; /* protected by kernfs_mutex */
> + int len = strlen(path);
...
> + if (len >= PATH_MAX)
> + return NULL;
> +
> + memcpy(path_buf, path, len + 1);
static char path_buf[P
Implement kernfs_walk_and_get() which is similar to
kernfs_find_and_get() but can walk a path instead of just a name.
Signed-off-by: Tejun Heo
Cc: Greg Kroah-Hartman
---
fs/kernfs/dir.c| 48
include/linux/kernfs.h | 12
2 fil