diff options
| -rw-r--r-- | fs/namespace.c | 6 |
1 files changed, 2 insertions, 4 deletions
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); } /* |