From: Al Viro Date: Sun, 24 Aug 2025 18:00:12 +0000 (-0400) Subject: do_move_mount_old(): use __free(path_put) X-Git-Url: https://www.infradead.org/git/?a=commitdiff_plain;h=43d672dbf1f20c1d09b4ee73498bb39442e70f18;p=users%2Fhch%2Fmisc.git do_move_mount_old(): use __free(path_put) Reviewed-by: Christian Brauner Signed-off-by: Al Viro --- diff --git a/fs/namespace.c b/fs/namespace.c index a97f8dc05864..ec4e95bab73d 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); } /*