Am Thu, Apr 22, 2021 at 11:19:22AM +0200 schrieb Martin Pieuchot: > uao_shrink() and uao_grow() are only used by TMPFS, ok to place them > under an #ifdef? This save some bytes on RAMDISKs.
sure, ok patrick@ > Index: uvm/uvm_aobj.c > =================================================================== > RCS file: /cvs/src/sys/uvm/uvm_aobj.c,v > retrieving revision 1.94 > diff -u -p -r1.94 uvm_aobj.c > --- uvm/uvm_aobj.c 31 Mar 2021 08:53:39 -0000 1.94 > +++ uvm/uvm_aobj.c 22 Apr 2021 09:00:27 -0000 > @@ -416,6 +416,7 @@ uao_free(struct uvm_aobj *aobj) > * pager functions > */ > > +#ifdef TMPFS > /* > * Shrink an aobj to a given number of pages. The procedure is always the > same: > * assess the necessity of data structure conversion (hash to array), secure > @@ -692,6 +693,7 @@ uao_grow(struct uvm_object *uobj, int pa > else > return uao_grow_convert(uobj, pages); > } > +#endif /* TMPFS */ > > /* > * uao_create: create an aobj of the given size and return its uvm_object. >
