Assign nullopt to remove unnecessary log
Once the client requests idmap2d to release a directory iterator,
idmap2d should follow the client request to free and release
frro_iter_.
It should not only check the value of frro_iter_ but also make
frro_iter_ to be nullopt in releaseFabricatedOverlayIterator.
Fixes: 244389702
Test: adb reboot; adb wait-for-device; adb logcat -s idmap2d
Change-Id: Ida1e7e7ae89f12407d26e66ab318a91e4f861df4
diff --git a/cmds/idmap2/idmap2d/Idmap2Service.cpp b/cmds/idmap2/idmap2d/Idmap2Service.cpp
index 083bbf01..320e147 100644
--- a/cmds/idmap2/idmap2d/Idmap2Service.cpp
+++ b/cmds/idmap2/idmap2d/Idmap2Service.cpp
@@ -312,6 +312,8 @@
Status Idmap2Service::releaseFabricatedOverlayIterator() {
if (!frro_iter_.has_value()) {
LOG(WARNING) << "no active ffro iterator to release";
+ } else {
+ frro_iter_ = std::nullopt;
}
return ok();
}