]> git.ipfire.org Git - thirdparty/systemd.git/commit
mount-util: store mount flags in "todo" list in + handle submounts gracefully
authorLennart Poettering <lennart@poettering.net>
Wed, 24 Mar 2021 13:07:32 +0000 (14:07 +0100)
committerLennart Poettering <lennart@poettering.net>
Fri, 26 Mar 2021 10:51:26 +0000 (11:51 +0100)
commitba8dced2a60d8535bf6d685e2fd164e5ff3f056b
tree4ec812cb3ab0fa8d050ea9d8fdfa725d93049f91
parent4b6ef52756ce1be1bd365c2bb63ad4f0c895c1a5
mount-util: store mount flags in "todo" list in + handle submounts gracefully

This replaces the "todo" set with a "todo" hash map that stores the
mount flags we found. This makes an explicit call to get_mount_flags()
unncessary, since we have the flags handy right-away, and lowers our
work from O(n^2) to O(n). Nice!

The "done" set is also improved slightly: we'll use more modern ways to
allocate it, via set_ensure_consume(), and freeing-via-hash_ops.

Finally, failures on submount remounts are now handled gracefully,
there are just too many reasons why they might fail, given NFS, autofs,
FUSE which weird access controls, where even root might lack the privs
to do something.

Fixes: #16156
src/shared/mount-util.c