Page MenuHomeFreeBSD

dev_pager: define free_page for mgt devices
ClosedPublic

Authored by dougm on Aug 21 2024, 2:07 AM.
Tags
None
Referenced Files
Unknown Object (File)
Tue, Jul 7, 3:27 PM
Unknown Object (File)
Apr 20 2026, 6:46 PM
Unknown Object (File)
Apr 20 2026, 12:43 PM
Unknown Object (File)
Apr 18 2026, 12:02 PM
Unknown Object (File)
Apr 18 2026, 11:29 AM
Unknown Object (File)
Apr 18 2026, 11:16 AM
Unknown Object (File)
Apr 17 2026, 7:24 PM
Unknown Object (File)
Apr 16 2026, 10:41 AM

Details

Summary

Callers of cdev_pager_free_page always have object->type == OBJT_MGTDEVICE. Define a function for them to call that skips the runtime type check.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

dougm requested review of this revision.Aug 21 2024, 2:07 AM
sys/vm/device_pager.c
264–265

I do not see much reason to keep this assert, both callees are asserting the same lock.

275

I suggest to keep the cdev_ name prefix. Like cdev_mgtdev_pager_free_page()

dougm marked 2 inline comments as done.

Accept all suggestions.

This revision is now accepted and ready to land.Aug 21 2024, 5:13 PM
This revision was automatically updated to reflect the committed changes.