tmpfs_seek_data_locked should return the offset of the first page either resident in memory or in swap, but may return an offset to a nonresident page. Check for residence to fix that.
Details
Details
Diff Detail
Diff Detail
- Repository
- rG FreeBSD src repository
- Lint
Lint Not Applicable - Unit
Tests Not Applicable
Event Timeline
sys/fs/tmpfs/tmpfs_vnops.c | ||
---|---|---|
2111 | If we encounter an invalid page, I believe we still need to consult the swap pager before proceeding to the next pindex. |
sys/fs/tmpfs/tmpfs_vnops.c | ||
---|---|---|
2111 | if m->pindex != p, testing vm_page_any_valid(m) needn't happen at all if p_swp == p or m->pindex >= p_swp. Otherwise, we were repeating it on the same page in the first iteration of the below loop. |
Comment Actions
Avoid checking the same page for validity twice, at the cost of finding the next page when it might turn out not to matter.