kmountpoint: Iterate mountpoint backwards to handle systemd-automount

When using systedm-automount it results in two entries in mountinfo for the same path. autofs and the actual fs. The actual fs appears AFTER the automount, which is why using backward iterators in libmount is usually the default.

Because autofs is a pseudofs for which trash is not available, we want to rather have the actual fs. Also, this way findByPath will return the expected result.

BUG:518012

Tested this on KDE Linux with a systemd-automount for a nfs filesystem.

Edited by Oliver Schramm

Merge request reports

Loading