I have been studying the code for mount 2.7f, which is supposed to
lock the /etc/mtab file before modifications. This locking is clearly
not working; however the locking code looks like it should do the
right thing. I have even prevented the /etc/mtab~ lockfile from ever
being removed, and the corruption of /etc/mtab still happens.
These tests suggest that the fcntl(2) locking system is not working
properly. Before I contemplate diving into the kernel code, is there
anyone else out there who has experienced problems with fcntl(2), or
knows about some bug? Alternatively, is there someone who knows of
some subtle bug in the mount programme itself which I've overlooked?
This problem is a real pain because I have a few large filesystems
which are needlessly checked whenever I boot.
Regards,
Richard....