Make finding the last or first mount to start iterating the mount namespace from an O(1) operation and add selftests for iterating the mount table starting from the first and last mount. Signed-off-by: Christian Brauner <brauner@xxxxxxxxxx> --- Christian Brauner (3): fs: kill MNT_ONRB fs: cache first and last mount selftests: add listmount() iteration tests fs/mount.h | 28 ++++++--- fs/namespace.c | 31 ++++++---- include/linux/mount.h | 3 +- .../selftests/filesystems/statmount/Makefile | 2 +- .../filesystems/statmount/listmount_test.c | 66 ++++++++++++++++++++++ 5 files changed, 107 insertions(+), 23 deletions(-) --- base-commit: 7664f78ba0c5f1466d0086e5db7039f971b3cc51 change-id: 20241215-vfs-6-14-mount-work-7f8591d51060