[PATCH 05/10] fs: use path_clone() in backing_file_set_user_path()
From: Mateusz Guzik
Date: Sun Sep 13 2026 - 10:54:23 EST
No functional changes.
Signed-off-by: Mateusz Guzik <mjguzik@xxxxxxxxx>
---
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