]> git.ipfire.org Git - thirdparty/util-linux.git/commit
mountpoint: use single libmount cache for all path resolutions
authorKarel Zak <kzak@redhat.com>
Wed, 19 Nov 2025 12:46:40 +0000 (13:46 +0100)
committerKarel Zak <kzak@redhat.com>
Thu, 20 Nov 2025 10:32:59 +0000 (11:32 +0100)
commitda5b727cd9a64d9992155f7ec60819a301c7354d
tree48180c40c3a91a077fd582a87f3c19665de09721
parentf7facbb928a908ff4453891e45f124669f8318f1
mountpoint: use single libmount cache for all path resolutions

Move libmount cache initialization to main() and pass it through
the control structure. This allows the cache to be reused across
all mnt_resolve_path() calls, reducing allocations.

Also add cleanup section in main() with goto labels for proper
resource deallocation in a single location.

Signed-off-by: Karel Zak <kzak@redhat.com>
sys-utils/mountpoint.c