On Mon, Oct 02, 2023 at 11:53:23AM +0300, Amir Goldstein wrote: > I've also considered just allocating the extra space for > ofs->mounts[] at super creation time rather than on super destruction. > I just cannot get myself to be bothered with this cleanup code > because of saving memory of ovl_fs. > > However, looking closer, we have a wasfull layer->name pointer, > which is only ever used for ovl_show_options() (to print the original > requested layer path from mount options). > > So I am inclined to move these rarely accessed pointers to > ofs->layer_names[], which can be used for the temp array for > kern_unmount_array() because freeing name does not need > RCU delay AFAICT (?). AFAICS, it doesn't. The only user after the setup is done is ->show_options(), i.e. show_vfsmnt() and show_mountinfo(). Anyone who tries to use those without making sure that struct mount is not going to come apart under them will have far worse troubles... FWIW, I'm perfectly fine with having these fixes go through your tree; they are independent from the rest of the series.