On Fri, May 02, 2025 at 07:50:57PM +0300, Andrey Kriulin wrote:
If the directory is corrupted and the number of nlinks is less than 2 (valid nlinks have at least 2), then when the directory is deleted, the minix_rmdir will try to reduce the nlinks(unsigned int) to a negative value.
Make nlinks validity check for directory in minix_lookup.
Not sure it's a good mitigation strategy - if nothing else, doing that on r/o filesystem is clear loss...