Commit 7427f3b
Andreas Gruenbacher
gfs2: Fix glock_hash_walk bugs
So far, glock_hash_walk took a reference on each glock it iterated over, and it
was the examiner's responsibility to drop those references. Dropping the final
reference to a glock can sleep and the examiners are called in a RCU critical
section with spin locks held, so examiners that didn't need the extra reference
had to drop it asynchronously via gfs2_glock_queue_put or similar. This wasn't
done correctly in thaw_glock which did call gfs2_glock_put, and not at all in
dump_glock_func.
Change glock_hash_walk to not take glock references at all. That way, the
examiners that don't need them won't have to bother with slow asynchronous
puts, and the examiners that do need references can take them themselves.
Reported-by: Alexander Aring <aahringo@redhat.com>
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>1 parent 486408d commit 7427f3b
1 file changed
Lines changed: 12 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2101 | 2101 | | |
2102 | 2102 | | |
2103 | 2103 | | |
2104 | | - | |
2105 | | - | |
2106 | | - | |
| 2104 | + | |
| 2105 | + | |
2107 | 2106 | | |
| 2107 | + | |
2108 | 2108 | | |
2109 | 2109 | | |
2110 | 2110 | | |
| |||
2146 | 2146 | | |
2147 | 2147 | | |
2148 | 2148 | | |
2149 | | - | |
2150 | 2149 | | |
2151 | 2150 | | |
2152 | 2151 | | |
| |||
2163 | 2162 | | |
2164 | 2163 | | |
2165 | 2164 | | |
2166 | | - | |
2167 | | - | |
| 2165 | + | |
| 2166 | + | |
| 2167 | + | |
2168 | 2168 | | |
2169 | | - | |
2170 | 2169 | | |
2171 | 2170 | | |
2172 | 2171 | | |
| |||
2182 | 2181 | | |
2183 | 2182 | | |
2184 | 2183 | | |
2185 | | - | |
2186 | | - | |
2187 | | - | |
| 2184 | + | |
| 2185 | + | |
| 2186 | + | |
| 2187 | + | |
| 2188 | + | |
| 2189 | + | |
2188 | 2190 | | |
2189 | 2191 | | |
2190 | 2192 | | |
| |||
0 commit comments