The iterator function getmntent() is not stable. It may skip
entries if the contents of the iterated file changes, which
is the case with /proc/mounts when filesystems are unmounted.
As a result, some filesystems were never unmounted.
To fix this, iteratation is now restarted after every
sucessful unmount.
The iterator function getmntent() is not stable. It may skip entries if the contents of the iterated file changes, which is the case with /proc/mounts when filesystems are unmounted. As a result, some filesystems were never unmounted.
To fix this, iteratation is now restarted after every sucessful unmount.
Signed-off-by: Robert Andersson robert.m.andersson@atlascopco.com Signed-off-by: Ming Liu liu.ming50@gmail.com