aboutsummaryrefslogtreecommitdiffstats
path: root/scripts/generate_rust_analyzer.py
diff options
context:
space:
mode:
authorHou Tao <houtao1@huawei.com>2022-12-16 12:23:53 +0800
committerMike Snitzer <snitzer@kernel.org>2023-02-17 14:49:21 -0500
commita2f998a78a425edde5a1a1973c1d4854fe9d019f (patch)
tree291cf12c7f177e9c60fbc9a0772b69364f64cf80 /scripts/generate_rust_analyzer.py
parentdm ioctl: assert _hash_lock is held in __hash_remove (diff)
downloadlinux-rng-a2f998a78a425edde5a1a1973c1d4854fe9d019f.tar.xz
linux-rng-a2f998a78a425edde5a1a1973c1d4854fe9d019f.zip
dm ioctl: remove unnecessary check when using dm_get_mdptr()
__hash_remove() removes hash_cell with _hash_lock locked, so acquiring _hash_lock can guarantee no-NULL hc returned from dm_get_mdptr() must have not been removed and hc->md must still be md. __hash_remove() also acquires dm_hash_cells_mutex before setting mdptr as NULL. So in dm_copy_name_and_uuid(), after acquiring dm_hash_cells_mutex and ensuring returned hc is not NULL, the returned hc must still be alive and hc->md must still be md. Remove the unnecessary hc->md != md checks when using dm_get_mdptr() with _hash_lock or dm_hash_cells_mutex acquired. Signed-off-by: Hou Tao <houtao1@huawei.com> Signed-off-by: Mike Snitzer <snitzer@kernel.org>
Diffstat (limited to 'scripts/generate_rust_analyzer.py')
0 files changed, 0 insertions, 0 deletions