From 43d672dbf1f20c1d09b4ee73498bb39442e70f18 Mon Sep 17 00:00:00 2001 From: Al Viro Date: Sun, 24 Aug 2025 14:00:12 -0400 Subject: [PATCH] do_move_mount_old(): use __free(path_put) Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- fs/namespace.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/fs/namespace.c b/fs/namespace.c index a97f8dc05864b..ec4e95bab73dc 100644 --- a/fs/namespace.c +++ b/fs/namespace.c @@ -3643,7 +3643,7 @@ static int do_move_mount(const struct path *old_path, static int do_move_mount_old(const struct path *path, const char *old_name) { - struct path old_path; + struct path old_path __free(path_put) = {}; int err; if (!old_name || !*old_name) @@ -3653,9 +3653,7 @@ static int do_move_mount_old(const struct path *path, const char *old_name) if (err) return err; - err = do_move_mount(&old_path, path, 0); - path_put(&old_path); - return err; + return do_move_mount(&old_path, path, 0); } /* -- 2.47.3