Re: [PATCH 05/10] fs: use path_clone() in backing_file_set_user_path()

From: Jan Kara

Date: Mon Sep 14 2026 - 05:12:54 EST


On Sun 13-09-26 16:49:12, Mateusz Guzik wrote:
> No functional changes.
>
> Signed-off-by: Mateusz Guzik <mjguzik@xxxxxxxxx>

Looks good. Feel free to add:

Reviewed-by: Jan Kara <jack@xxxxxxx>

Honza

> ---
> fs/file_table.c | 3 +--
> 1 file changed, 1 insertion(+), 2 deletions(-)
>
> diff --git a/fs/file_table.c b/fs/file_table.c
> index f9d1b5edd6ae..0dca0c6c991f 100644
> --- a/fs/file_table.c
> +++ b/fs/file_table.c
> @@ -70,8 +70,7 @@ EXPORT_SYMBOL_GPL(backing_file_user_path);
>
> void backing_file_set_user_path(struct file *f, const struct path *path)
> {
> - backing_file(f)->user_path = *path;
> - path_get(path);
> + path_clone(path, &backing_file(f)->user_path);
> }
>
> #ifdef CONFIG_SECURITY
> --
> 2.53.0
>
--
Jan Kara <jack@xxxxxxxx>
SUSE Labs, CR