]> git.apps.os.sepia.ceph.com Git - xfstests-dev.git/commit
common: Chown mount even if already idmapped to account for remounts
authorGabriel Niebler <gniebler@suse.com>
Fri, 3 Feb 2023 17:54:37 +0000 (18:54 +0100)
committerZorro Lang <zlang@kernel.org>
Sat, 11 Feb 2023 04:35:38 +0000 (12:35 +0800)
commit711a7a2c2bb6ea7d77a9a4d62a144c6728e9f5e7
treec886751706ae1dc12f0aa0c27c64e5436bd16958
parenta04ce1ddfca1b2bd3db65aecba759ac684ac4518
common: Chown mount even if already idmapped to account for remounts

This is a logical consequence of introducing the chown check in _idmapped_mount,
since now a read-only mount can be made idmapped successfully. But if the mount
is then remounted rw the chown never happens, as _idmapped_mount sees that it's
already idmapped and bows out early.

This patch fixes that by simply moving the chown ahead of the idmapped check,
so it will be performed in any case, even on already idmapped mounts.

Signed-off-by: Gabriel Niebler <gniebler@suse.com>
Reviewed-by: Christian Brauner <brauner@kernel.org>
Signed-off-by: Zorro Lang <zlang@kernel.org>
common/rc