Commit 5e3b723
Kent Overstreet
bcachefs: Fix sysfs warning in fstests generic/730,731
sysfs warns if we're removing a symlink from a directory that's no
longer in sysfs; this is triggered by fstests generic/730, which
simulates hot removal of a block device.
This patch is however not a correct fix, since checking
kobj->state_in_sysfs on a kobj owned by another subsystem is racy.
A better fix would be to add the appropriate check to
sysfs_remove_link() - and sysfs_create_link() as well.
But kobject_add_internal()/kobject_del() do not as of today have locking
that would support that.
Note that the block/holder.c code appears to be subject to this race as
well.
Cc: Greg Kroah-Hartman <[email protected]>
Cc: "Rafael J. Wysocki" <[email protected]>
Cc: Christoph Hellwig <[email protected]>
Signed-off-by: Kent Overstreet <[email protected]>1 parent cb6055e commit 5e3b723
1 file changed
+24
-10
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
184 | 184 | | |
185 | 185 | | |
186 | 186 | | |
| 187 | + | |
187 | 188 | | |
188 | 189 | | |
189 | 190 | | |
| |||
620 | 621 | | |
621 | 622 | | |
622 | 623 | | |
623 | | - | |
624 | | - | |
625 | | - | |
| 624 | + | |
626 | 625 | | |
627 | 626 | | |
628 | 627 | | |
| |||
1187 | 1186 | | |
1188 | 1187 | | |
1189 | 1188 | | |
1190 | | - | |
1191 | | - | |
1192 | | - | |
| 1189 | + | |
1193 | 1190 | | |
1194 | 1191 | | |
1195 | 1192 | | |
| |||
1226 | 1223 | | |
1227 | 1224 | | |
1228 | 1225 | | |
1229 | | - | |
1230 | | - | |
1231 | | - | |
1232 | | - | |
| 1226 | + | |
1233 | 1227 | | |
1234 | 1228 | | |
1235 | 1229 | | |
| |||
1251 | 1245 | | |
1252 | 1246 | | |
1253 | 1247 | | |
| 1248 | + | |
| 1249 | + | |
| 1250 | + | |
| 1251 | + | |
| 1252 | + | |
| 1253 | + | |
| 1254 | + | |
| 1255 | + | |
| 1256 | + | |
| 1257 | + | |
| 1258 | + | |
| 1259 | + | |
| 1260 | + | |
| 1261 | + | |
| 1262 | + | |
| 1263 | + | |
| 1264 | + | |
| 1265 | + | |
| 1266 | + | |
| 1267 | + | |
1254 | 1268 | | |
1255 | 1269 | | |
1256 | 1270 | | |
| |||
0 commit comments