Commit be64bbb
committed
block: Pass BdrvChild ** to replace_child_noperm
bdrv_replace_child_noperm() modifies BdrvChild.bs, and can potentially
set it to NULL. That is dangerous, because BDS parents generally assume
that their children's .bs pointer is never NULL. We therefore want to
let bdrv_replace_child_noperm() set the corresponding BdrvChild pointer
to NULL, too.
This patch lays the foundation for it by passing a BdrvChild ** pointer
to bdrv_replace_child_noperm() so that it can later use it to NULL the
BdrvChild pointer immediately after setting BdrvChild.bs to NULL.
(We will still need to undertake some intermediate steps, though.)
Signed-off-by: Hanna Reitz <[email protected]>
Message-Id: <[email protected]>
Reviewed-by: Vladimir Sementsov-Ogievskiy <[email protected]>
Signed-off-by: Kevin Wolf <[email protected]>
Message-Id: <[email protected]>
Signed-off-by: Hanna Reitz <[email protected]>1 parent 2651806 commit be64bbb
1 file changed
+12
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
87 | 87 | | |
88 | 88 | | |
89 | 89 | | |
90 | | - | |
| 90 | + | |
91 | 91 | | |
92 | 92 | | |
93 | 93 | | |
| |||
2270 | 2270 | | |
2271 | 2271 | | |
2272 | 2272 | | |
2273 | | - | |
| 2273 | + | |
2274 | 2274 | | |
2275 | 2275 | | |
2276 | 2276 | | |
| |||
2300 | 2300 | | |
2301 | 2301 | | |
2302 | 2302 | | |
2303 | | - | |
| 2303 | + | |
2304 | 2304 | | |
2305 | 2305 | | |
2306 | 2306 | | |
| |||
2672 | 2672 | | |
2673 | 2673 | | |
2674 | 2674 | | |
2675 | | - | |
| 2675 | + | |
2676 | 2676 | | |
2677 | 2677 | | |
| 2678 | + | |
2678 | 2679 | | |
2679 | 2680 | | |
2680 | 2681 | | |
| |||
2767 | 2768 | | |
2768 | 2769 | | |
2769 | 2770 | | |
2770 | | - | |
| 2771 | + | |
2771 | 2772 | | |
2772 | 2773 | | |
2773 | 2774 | | |
| |||
2867 | 2868 | | |
2868 | 2869 | | |
2869 | 2870 | | |
2870 | | - | |
| 2871 | + | |
2871 | 2872 | | |
2872 | 2873 | | |
2873 | 2874 | | |
| |||
2922 | 2923 | | |
2923 | 2924 | | |
2924 | 2925 | | |
2925 | | - | |
| 2926 | + | |
2926 | 2927 | | |
2927 | | - | |
| 2928 | + | |
2928 | 2929 | | |
2929 | | - | |
2930 | | - | |
| 2930 | + | |
| 2931 | + | |
2931 | 2932 | | |
2932 | 2933 | | |
2933 | 2934 | | |
| |||
3033 | 3034 | | |
3034 | 3035 | | |
3035 | 3036 | | |
3036 | | - | |
| 3037 | + | |
3037 | 3038 | | |
3038 | 3039 | | |
3039 | 3040 | | |
| |||
0 commit comments