mirror of
https://github.com/torvalds/linux.git
synced 2026-05-25 15:41:52 +02:00
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>
This commit is contained in:
parent
86af25b01d
commit
43d672dbf1
|
|
@ -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);
|
||||
}
|
||||
|
||||
/*
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user