Commit d9a75a6
Andreas Gruenbacher
gfs2: Be more careful with the quota sync generation
The quota sync generation is only ever updated under sd_quota_sync_mutex
by gfs2_quota_sync(), but its current value is fetched ouside of that
mutex, so use WRITE_ONCE() and READ_ONCE() when accessing it without
holding that mutex.
Pass the current sync generation to do_sync() from its callers to ensure
that we're not recording the wrong generation when the syncing is
done. Also, make sure that qd->qd_sync_gen only ever moves forward.
In gfs2_quota_sync(), only write the new sync generation when we know
that there are changes. This eliminates the need for function
sd_changed(), which we will remove in the next commit.
Signed-off-by: Andreas Gruenbacher <[email protected]>1 parent 8d89e06 commit d9a75a6
1 file changed
+19
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
891 | 891 | | |
892 | 892 | | |
893 | 893 | | |
894 | | - | |
| 894 | + | |
| 895 | + | |
895 | 896 | | |
896 | 897 | | |
897 | 898 | | |
| |||
982 | 983 | | |
983 | 984 | | |
984 | 985 | | |
985 | | - | |
986 | | - | |
| 986 | + | |
| 987 | + | |
| 988 | + | |
| 989 | + | |
| 990 | + | |
| 991 | + | |
| 992 | + | |
987 | 993 | | |
988 | 994 | | |
989 | 995 | | |
| |||
1177 | 1183 | | |
1178 | 1184 | | |
1179 | 1185 | | |
1180 | | - | |
| 1186 | + | |
| 1187 | + | |
| 1188 | + | |
1181 | 1189 | | |
1182 | 1190 | | |
1183 | 1191 | | |
| |||
1323 | 1331 | | |
1324 | 1332 | | |
1325 | 1333 | | |
| 1334 | + | |
1326 | 1335 | | |
1327 | 1336 | | |
1328 | 1337 | | |
| |||
1335 | 1344 | | |
1336 | 1345 | | |
1337 | 1346 | | |
1338 | | - | |
| 1347 | + | |
1339 | 1348 | | |
1340 | 1349 | | |
1341 | 1350 | | |
| |||
1344 | 1353 | | |
1345 | 1354 | | |
1346 | 1355 | | |
1347 | | - | |
| 1356 | + | |
1348 | 1357 | | |
1349 | 1358 | | |
1350 | 1359 | | |
| |||
1365 | 1374 | | |
1366 | 1375 | | |
1367 | 1376 | | |
1368 | | - | |
1369 | | - | |
| 1377 | + | |
| 1378 | + | |
| 1379 | + | |
| 1380 | + | |
1370 | 1381 | | |
1371 | 1382 | | |
1372 | 1383 | | |
| |||
0 commit comments