summaryrefslogtreecommitdiff
path: root/scripts/gdb/linux/tasks.py
diff options
context:
space:
mode:
authorAl Viro <viro@zeniv.linux.org.uk>2025-08-20 14:50:09 -0400
committerAl Viro <viro@zeniv.linux.org.uk>2025-09-02 19:35:58 -0400
commitc1ab70be88f3135cdb931673aae2afc5d6624b62 (patch)
tree3b98f801ff1347820f921b5b93f0f8a9dec4f336 /scripts/gdb/linux/tasks.py
parenta666bbcf7e9c5e0524b60677a0a43a4cddedcefd (diff)
do_move_mount(): deal with the checks on old_path early
1) checking that location we want to move does point to root of some mount can be done before anything else; that property is not going to change and having it already verified simplifies the analysis. 2) checking the type agreement between what we are trying to move and what we are trying to move it onto also belongs in the very beginning - do_lock_mount() might end up switching new_path to something that overmounts the original location, but... the same type agreement applies to overmounts, so we could just as well check against the original location. 3) since we know that old_path->dentry is the root of old_path->mnt, there's no point bothering with path_is_overmounted() in can_move_mount_beneath(); it's simply a check for the mount we are trying to move having non-NULL ->overmount. And with that, we can switch can_move_mount_beneath() to taking old instead of old_path, leaving no uses of old_path past the original checks. Reviewed-by: Christian Brauner <brauner@kernel.org> Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'scripts/gdb/linux/tasks.py')
0 files changed, 0 insertions, 0 deletions