Commit 2da7809
block: Fix dev_t minor allocation lifetime
Releases the dev_t minor when all references are closed to prevent
another device from acquiring the same major/minor.
Since the partition's release may be invoked from call_rcu's soft-irq
context, the ext_dev_idr's mutex had to be replaced with a spinlock so
as not so sleep.
Signed-off-by: Keith Busch <[email protected]>
Cc: [email protected]
Signed-off-by: Jens Axboe <[email protected]>1 parent 5676e7b commit 2da7809
2 files changed
+15
-11
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
| 31 | + | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
420 | 420 | | |
421 | 421 | | |
422 | 422 | | |
423 | | - | |
424 | | - | |
425 | | - | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
| 427 | + | |
| 428 | + | |
| 429 | + | |
426 | 430 | | |
427 | 431 | | |
428 | 432 | | |
| |||
447 | 451 | | |
448 | 452 | | |
449 | 453 | | |
450 | | - | |
| 454 | + | |
451 | 455 | | |
452 | | - | |
| 456 | + | |
453 | 457 | | |
454 | 458 | | |
455 | 459 | | |
| |||
665 | 669 | | |
666 | 670 | | |
667 | 671 | | |
668 | | - | |
669 | 672 | | |
670 | 673 | | |
671 | 674 | | |
| |||
690 | 693 | | |
691 | 694 | | |
692 | 695 | | |
693 | | - | |
| 696 | + | |
694 | 697 | | |
695 | 698 | | |
696 | 699 | | |
697 | 700 | | |
698 | 701 | | |
699 | | - | |
| 702 | + | |
700 | 703 | | |
701 | 704 | | |
702 | 705 | | |
| |||
1098 | 1101 | | |
1099 | 1102 | | |
1100 | 1103 | | |
| 1104 | + | |
1101 | 1105 | | |
1102 | 1106 | | |
1103 | 1107 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
211 | 211 | | |
212 | 212 | | |
213 | 213 | | |
| 214 | + | |
214 | 215 | | |
215 | 216 | | |
216 | 217 | | |
| |||
253 | 254 | | |
254 | 255 | | |
255 | 256 | | |
256 | | - | |
257 | 257 | | |
258 | 258 | | |
259 | 259 | | |
| |||
0 commit comments