Commit f80e166
fsdax: invalidate pages when CoW
CoW changes the share state of a dax page, but the share count of the page
isn't updated. The next time access this page, it should have been a
newly accessed, but old association exists. So, we need to clear the
share state when CoW happens, in both dax_iomap_rw() and dax_zero_iter().
Link: https://lkml.kernel.org/r/1669908538-55-3-git-send-email-ruansy.fnst@fujitsu.com
Signed-off-by: Shiyang Ruan <ruansy.fnst@fujitsu.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Cc: Alistair Popple <apopple@nvidia.com>
Cc: Dan Williams <dan.j.williams@intel.com>
Cc: Dave Chinner <david@fromorbit.com>
Cc: Jason Gunthorpe <jgg@nvidia.com>
Cc: John Hubbard <jhubbard@nvidia.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>1 parent 1690042 commit f80e166
1 file changed
+13
-4
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1264 | 1264 | | |
1265 | 1265 | | |
1266 | 1266 | | |
| 1267 | + | |
| 1268 | + | |
| 1269 | + | |
| 1270 | + | |
| 1271 | + | |
| 1272 | + | |
| 1273 | + | |
| 1274 | + | |
| 1275 | + | |
1267 | 1276 | | |
1268 | 1277 | | |
1269 | 1278 | | |
| |||
1324 | 1333 | | |
1325 | 1334 | | |
1326 | 1335 | | |
1327 | | - | |
| 1336 | + | |
1328 | 1337 | | |
1329 | 1338 | | |
1330 | 1339 | | |
1331 | 1340 | | |
1332 | 1341 | | |
| 1342 | + | |
1333 | 1343 | | |
1334 | 1344 | | |
1335 | 1345 | | |
| |||
1356 | 1366 | | |
1357 | 1367 | | |
1358 | 1368 | | |
1359 | | - | |
| 1369 | + | |
1360 | 1370 | | |
1361 | 1371 | | |
1362 | 1372 | | |
| |||
1390 | 1400 | | |
1391 | 1401 | | |
1392 | 1402 | | |
1393 | | - | |
1394 | | - | |
| 1403 | + | |
1395 | 1404 | | |
1396 | 1405 | | |
1397 | 1406 | | |
| |||
0 commit comments