Repository navigation
Commit 4f89849
frontswap: get rid of swap_lock dependency
Frontswap initialization routine depends on swap_lock, which want to be
atomic about frontswap's first appearance. IOW, frontswap is not present
and will fail all calls OR frontswap is fully functional but if new
swap_info_struct isn't registered by enable_swap_info, swap subsystem
doesn't start I/O so there is no race between init procedure and page I/O
working on frontswap.
So let's remove unnecessary swap_lock dependency.
Cc: Dan Magenheimer <dan.magenheimer@oracle.com>
Signed-off-by: Minchan Kim <minchan@kernel.org>
[v1: Rebased on my branch, reworked to work with backends loading late]
[v2: Added a check for !map]
[v3: Made the invalidate path follow the init path]
[v4: Address comments by Wanpeng Li <liwanp@linux.vnet.ibm.com>]
Signed-off-by: Konrad Rzeszutek Wilk <konrad@darnok.org>
Signed-off-by: Bob Liu <lliubbo@gmail.com>
Cc: Wanpeng Li <liwanp@linux.vnet.ibm.com>
Cc: Andor Daam <andor.daam@googlemail.com>
Cc: Florian Schmaus <fschmaus@gmail.com>
Cc: Stefan Hengelein <ilendir@googlemail.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>1 parent f066ea2 commit 4f89849
3 files changed
Lines changed: 35 additions & 19 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
23 | 23 | | |
24 | 24 | | |
25 | 25 | | |
26 | | - | |
| 26 | + | |
27 | 27 | | |
28 | 28 | | |
29 | 29 | | |
| |||
98 | 98 | | |
99 | 99 | | |
100 | 100 | | |
101 | | - | |
| 101 | + | |
102 | 102 | | |
103 | 103 | | |
104 | | - | |
| 104 | + | |
105 | 105 | | |
106 | 106 | | |
107 | 107 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
121 | 121 | | |
122 | 122 | | |
123 | 123 | | |
124 | | - | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
125 | 129 | | |
| 130 | + | |
126 | 131 | | |
127 | 132 | | |
128 | 133 | | |
| |||
156 | 161 | | |
157 | 162 | | |
158 | 163 | | |
159 | | - | |
| 164 | + | |
160 | 165 | | |
161 | 166 | | |
162 | 167 | | |
163 | | - | |
164 | | - | |
165 | | - | |
166 | | - | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
167 | 183 | | |
168 | | - | |
| 184 | + | |
169 | 185 | | |
170 | 186 | | |
171 | 187 | | |
172 | | - | |
173 | 188 | | |
174 | 189 | | |
175 | 190 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
1513 | | - | |
| 1512 | + | |
1514 | 1513 | | |
1515 | 1514 | | |
1516 | 1515 | | |
| |||
1519 | 1518 | | |
1520 | 1519 | | |
1521 | 1520 | | |
1522 | | - | |
1523 | 1521 | | |
1524 | 1522 | | |
1525 | 1523 | | |
| |||
1542 | 1540 | | |
1543 | 1541 | | |
1544 | 1542 | | |
| 1543 | + | |
1545 | 1544 | | |
1546 | 1545 | | |
1547 | | - | |
1548 | | - | |
| 1546 | + | |
1549 | 1547 | | |
1550 | 1548 | | |
1551 | 1549 | | |
| |||
1554 | 1552 | | |
1555 | 1553 | | |
1556 | 1554 | | |
1557 | | - | |
| 1555 | + | |
1558 | 1556 | | |
1559 | 1557 | | |
1560 | 1558 | | |
| |||
1563 | 1561 | | |
1564 | 1562 | | |
1565 | 1563 | | |
| 1564 | + | |
1566 | 1565 | | |
1567 | 1566 | | |
1568 | 1567 | | |
| |||
1662 | 1661 | | |
1663 | 1662 | | |
1664 | 1663 | | |
1665 | | - | |
| 1664 | + | |
| 1665 | + | |
1666 | 1666 | | |
1667 | 1667 | | |
| 1668 | + | |
1668 | 1669 | | |
1669 | 1670 | | |
1670 | | - | |
| 1671 | + | |
1671 | 1672 | | |
1672 | 1673 | | |
1673 | 1674 | | |
| |||
0 commit comments