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)
Fri, Mar 7, 11:51 AM
Unknown Object (File)
Feb 22 2025, 2:12 PM
Unknown Object (File)
Feb 22 2025, 1:42 PM
Unknown Object (File)
Feb 22 2025, 1:39 PM
Unknown Object (File)
Feb 18 2025, 11:22 PM
Unknown Object (File)
Feb 3 2025, 4:05 AM
Unknown Object (File)
Feb 2 2025, 3:42 PM
Unknown Object (File)
Jan 30 2025, 1:29 PM

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

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

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.