]> git.ipfire.org Git - thirdparty/util-linux.git/commit
libmount: when moving a mount point, all sub mount entries in utab should also be...
authorFranck Bui <fbui@suse.com>
Fri, 22 Apr 2022 09:30:09 +0000 (11:30 +0200)
committerKarel Zak <kzak@redhat.com>
Wed, 20 Jul 2022 15:30:27 +0000 (17:30 +0200)
commite0b219ffd07b570a629f386824e6a8db52bb44f4
tree5119ebd5e6a7bff167775e0f382b411427c9859f
parent4f4948c4a5100ca570bd074c959b4ea468ce99cd
libmount: when moving a mount point, all sub mount entries in utab should also be updated

Given that /run/mount/utab stores paths, this file needs to be adjusted when a
mount tree is moved.

However the moved tree may contains sub mount points in which case their utab
entries (if any) need to also be translated.

This patch takes care of that.

As suggested in https://github.com/systemd/systemd/issues/15266, a better
approach might be to store mount IDs instead of paths since mount IDs remain
unchanged when mount trees are moved.

Fixes: #1659
libmount/src/tab_update.c