diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2025-08-15 15:38:14 -0400 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2025-08-19 11:58:18 -0400 |
commit | 0ddfb62f5d018edcb571a3d8ea30ad5332cf2a69 (patch) | |
tree | 0ebcb9ab807cebd06512f8ec89956c56c94882c1 /scripts/rustdoc_test_builder.rs | |
parent | 8742b2d8935f476449ef37e263bc4da3295c7b58 (diff) |
fix the softlockups in attach_recursive_mnt()
In case when we mounting something on top of a large stack of overmounts,
all of them being peers of each other, we get quadratic time by the
depth of overmount stack. Easily fixed by doing commit_tree() before
reparenting the overmount; simplifies commit_tree() as well - it doesn't
need to skip the already mounted stuff that had been reparented on top
of the new mounts.
Since we are holding mount_lock through both reparenting and call of
commit_tree(), the order does not matter from the mount hash point
of view.
Reported-by: "Lai, Yi" <yi1.lai@linux.intel.com>
Tested-by: "Lai, Yi" <yi1.lai@linux.intel.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Fixes: 663206854f02 "copy_tree(): don't link the mounts via mnt_list"
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
Diffstat (limited to 'scripts/rustdoc_test_builder.rs')
0 files changed, 0 insertions, 0 deletions