From 91bcfd8d7faf264dbbae695a16970cce66819ea3 Mon Sep 17 00:00:00 2001 From: Eric Biggers Date: Tue, 25 Feb 2020 11:11:35 -0800 Subject: [PATCH] fs_mgr: fix checking for casefold feature already enabled EXT4_FEATURE_INCOMPAT_CASEFOLD is a flag in s_feature_incompat, not in s_feature_ro_compat. Bug: 138322712 Test: Treehugger Change-Id: I07bb1d2b818d423196d8ceebda8900a8adbb19e9 --- fs_mgr/fs_mgr.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/fs_mgr/fs_mgr.cpp b/fs_mgr/fs_mgr.cpp index bd35815ba..52230871e 100644 --- a/fs_mgr/fs_mgr.cpp +++ b/fs_mgr/fs_mgr.cpp @@ -512,8 +512,7 @@ static void tune_verity(const std::string& blk_device, const FstabEntry& entry, // Enable casefold if needed. static void tune_casefold(const std::string& blk_device, const struct ext4_super_block* sb, int* fs_stat) { - bool has_casefold = - (sb->s_feature_ro_compat & cpu_to_le32(EXT4_FEATURE_INCOMPAT_CASEFOLD)) != 0; + bool has_casefold = (sb->s_feature_incompat & cpu_to_le32(EXT4_FEATURE_INCOMPAT_CASEFOLD)) != 0; bool wants_casefold = android::base::GetBoolProperty("ro.emulated_storage.casefold", false); if (!wants_casefold || has_casefold) return;