Page MenuHomeFreeBSD

tmpfs: Move partial page invalidation to a separate helper
ClosedPublic

Authored by khng on Aug 25 2021, 8:13 PM.
Tags
None
Referenced Files
F165698304: D31683.id94188.diff
Sun, Aug 9, 8:41 AM
F165665078: D31683.id94200.diff
Sun, Aug 9, 2:21 AM
Unknown Object (File)
Sat, Aug 8, 6:20 AM
Unknown Object (File)
Fri, Aug 7, 7:56 PM
Unknown Object (File)
Thu, Aug 6, 8:41 AM
Unknown Object (File)
Mon, Jul 27, 10:51 AM
Unknown Object (File)
Tue, Jul 21, 12:30 AM
Unknown Object (File)
Sun, Jul 19, 9:38 PM
Subscribers

Details

Summary

The partial page invalidation code is factored out to be a separate
helper from tmpfs_reg_resize().

Sponsored by: The FreeBSD Foundation

Diff Detail

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

Event Timeline

khng requested review of this revision.Aug 25 2021, 8:13 PM
sys/fs/tmpfs/tmpfs_subr.c
404

Replace the whole 'else' branch with something along the lines:

vm_page_free(m);
m = NULL;
if (!ignerr)
    error = EIO;

and change return (0); at the end with return (error);

1755–1757

By convention 'rv' var holds a Mach error code, not errno. Since tmpfs_partial_page_invalidate() returns errno, better rename rv there.

khng marked 2 inline comments as done.

Cleanups suggested by kib@

This revision is now accepted and ready to land.Aug 25 2021, 8:50 PM