ANDROID: Incremental fs: Fix remount

Bug: 153017385
Test: incfs_test passes
Signed-off-by: Paul Lawrence <paullawrence@google.com>
Change-Id: I13f3a3c91d746d725e0e21b1e2bcfe0a64a13716
This commit is contained in:
Paul Lawrence
2020-04-01 16:04:39 -07:00
parent ca72c79936
commit 2fb9b719ce
6 changed files with 64 additions and 27 deletions

View File

@@ -41,12 +41,13 @@ int mount_fs(const char *mount_dir, const char *backing_dir,
}
int mount_fs_opt(const char *mount_dir, const char *backing_dir,
const char *opt)
const char *opt, bool remount)
{
static const char fs_name[] = INCFS_NAME;
int result;
result = mount(backing_dir, mount_dir, fs_name, 0, opt);
result = mount(backing_dir, mount_dir, fs_name,
remount ? MS_REMOUNT : 0, opt);
if (result != 0)
perror("Error mounting fs.");
return result;