summaryrefslogtreecommitdiff
path: root/drivers/md/dm-android-verity.c
diff options
context:
space:
mode:
authorBadhri Jagan Sridharan <Badhri@google.com>2016-06-03 13:16:59 -0700
committerRunmin Wang <runminw@codeaurora.org>2017-07-20 17:22:02 -0700
commitba29279a5afdb0b8475aea31cc3d61d43037ee22 (patch)
treed14469c7a043b349fa4d97c1bf720db81cc38e6c /drivers/md/dm-android-verity.c
parent7aa065cbc4f86125895f6c7c6a5ac1fdda231505 (diff)
ANDROID: android-verity: mark dev as rw for linear target
Mark as rw when adding as linear target to allow changes to the underlying filesystem through adb disable verity and adb remount. (Cherry-picked from https://partner-android-review.googlesource.com/#/c/613573/ 79a3032bb62da65a5d724eb70c8bdc662945d475) BUG: 28845874 Signed-off-by: Badhri Jagan Sridharan <Badhri@google.com> Change-Id: If41e9cad8e0f054f4778c09a6e2f0cb8af6fddaf Git-commit: 492a6047e7b5a1383627189e8bff99ff181ef4a4 Git-repo: https://android.googlesource.com/kernel/common/ Signed-off-by: Runmin Wang <runminw@codeaurora.org>
Diffstat (limited to 'drivers/md/dm-android-verity.c')
-rw-r--r--drivers/md/dm-android-verity.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/md/dm-android-verity.c b/drivers/md/dm-android-verity.c
index 4f6086970131..43d566fd38ae 100644
--- a/drivers/md/dm-android-verity.c
+++ b/drivers/md/dm-android-verity.c
@@ -645,6 +645,8 @@ static int add_as_linear_device(struct dm_target *ti, char *dev)
android_verity_target.iterate_devices = dm_linear_iterate_devices,
android_verity_target.io_hints = NULL;
+ set_disk_ro(dm_disk(dm_table_get_md(ti->table)), 0);
+
err = dm_linear_ctr(ti, DM_LINEAR_ARGS, linear_table_args);
if (!err) {