Remove unneeded 'slave' flag for /data_mirror/data_ce/null
Remove the 'slave' mount flag that was added by commit ef927522 (https://r.android.com/2095463) because it doesn't actually do anything in this context. MS_SLAVE can only be used to change the propagation type of an existing mount, and the kernel ignores it if MS_BIND is also specified, due to the way the various high-level operations that the mount() system call can do are prioritized. The reason that the /data/user/0 mount gets propagated into /data_mirror anyway is because the /data mount has the "shared" propagation type. In the above-mentioned commit I had assumed the default Linux mount semantics, but actually Android applies the "shared" propagation type to everything (see SetupMountNamespaces() in init/mount_namespace.cpp). Test: Booted Cuttlefish and verified (via /proc/self/mountinfo) that /data/data is still bind-mounted to both /data/user/0 and /data_mirror/data_ce/null/0. Bug: 156305599 BYPASS_INCLUSIVE_LANGUAGE_REASON=commit message mentioning removed code Change-Id: Idc45d8dcb3a21d4e8e2e72f4d4dda7286f898127
Loading
Please register or sign in to comment