]> 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)
committerFranck Bui <fbui@suse.com>
Fri, 22 Apr 2022 09:31:05 +0000 (11:31 +0200)
commita04149fbb7c1952da1194d1514e298ff07dbc7ca
treef9e1710c974d216932f816a0b6ed69b36a042728
parentef7d50a0cc59d3b55587c8ea5fa45db45b888aee
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