Skip to content

Commit 43d672d

Browse files
author
Al Viro
committed
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>
1 parent 86af25b commit 43d672d

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

fs/namespace.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3643,7 +3643,7 @@ static int do_move_mount(const struct path *old_path,
36433643

36443644
static int do_move_mount_old(const struct path *path, const char *old_name)
36453645
{
3646-
struct path old_path;
3646+
struct path old_path __free(path_put) = {};
36473647
int err;
36483648

36493649
if (!old_name || !*old_name)
@@ -3653,9 +3653,7 @@ static int do_move_mount_old(const struct path *path, const char *old_name)
36533653
if (err)
36543654
return err;
36553655

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);
36593657
}
36603658

36613659
/*

0 commit comments

Comments
 (0)