Repository navigation
Commit 8e75fd8
btrfs: Stop using call_rcu for device freeing
btrfs_device structs are freed from RCU context since device iteration
is protected by RCU. Currently this is achieved by using call_rcu since
no blocking functions are called within btrfs_free_device. Future
refactoring of pending/pinned chunks will require calling sleeping
functions.
This patch is in preparation for these changes by simply switching from
RCU callbacks to explicit calls of synchronize_rcu and calling
btrfs_free_device directly. This is functionally equivalent, making sure
that there are no readers at that time.
Signed-off-by: Nikolay Borisov <nborisov@suse.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 4ca7365 commit 8e75fd8
2 files changed
Lines changed: 8 additions & 13 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1231 | 1231 | | |
1232 | 1232 | | |
1233 | 1233 | | |
1234 | | - | |
1235 | | - | |
1236 | | - | |
1237 | | - | |
1238 | | - | |
1239 | | - | |
1240 | | - | |
1241 | | - | |
1242 | 1234 | | |
1243 | 1235 | | |
1244 | 1236 | | |
| |||
1286 | 1278 | | |
1287 | 1279 | | |
1288 | 1280 | | |
1289 | | - | |
| 1281 | + | |
| 1282 | + | |
1290 | 1283 | | |
1291 | 1284 | | |
1292 | 1285 | | |
| |||
2243 | 2236 | | |
2244 | 2237 | | |
2245 | 2238 | | |
2246 | | - | |
| 2239 | + | |
| 2240 | + | |
2247 | 2241 | | |
2248 | 2242 | | |
2249 | 2243 | | |
| |||
2311 | 2305 | | |
2312 | 2306 | | |
2313 | 2307 | | |
2314 | | - | |
| 2308 | + | |
| 2309 | + | |
2315 | 2310 | | |
2316 | 2311 | | |
2317 | 2312 | | |
| |||
2369 | 2364 | | |
2370 | 2365 | | |
2371 | 2366 | | |
2372 | | - | |
| 2367 | + | |
| 2368 | + | |
2373 | 2369 | | |
2374 | 2370 | | |
2375 | 2371 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
118 | 118 | | |
119 | 119 | | |
120 | 120 | | |
121 | | - | |
122 | 121 | | |
123 | 122 | | |
124 | 123 | | |
| |||
0 commit comments