All paths leading into closefp() will either replace or remove the fd from the filedesc table, and closefp() will call fo_close that can and do currently sleep without regard for the possibility of an ERESTART. This can be dangerous in multithreaded applications as another thread could have opened another file in its place that is subsequently operated on upon restart.
The following are seemingly the only ones that will pass back ERESTART in-tree, at least, though I haven't looked past sys/kern, sys/fs, sys/ufs:
- soo_close/soclose (SO_LINGER)
- fusefs
- nfsclient