Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

do_move_mount_old(): use __free(path_put)

Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>

Al Viro 43d672db 86af25b0

+2 -4
+2 -4
fs/namespace.c
··· 3643 3643 3644 3644 static int do_move_mount_old(const struct path *path, const char *old_name) 3645 3645 { 3646 - struct path old_path; 3646 + struct path old_path __free(path_put) = {}; 3647 3647 int err; 3648 3648 3649 3649 if (!old_name || !*old_name) ··· 3653 3653 if (err) 3654 3654 return err; 3655 3655 3656 - err = do_move_mount(&old_path, path, 0); 3657 - path_put(&old_path); 3658 - return err; 3656 + return do_move_mount(&old_path, path, 0); 3659 3657 } 3660 3658 3661 3659 /*