From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mga12.intel.com (mga12.intel.com []) by mx.groups.io with SMTP id smtpd.web10.2735.1594175250936997826 for ; Tue, 07 Jul 2020 19:27:34 -0700 Authentication-Results: mx.groups.io; dkim=missing; spf=fail (domain: intel.com, ip: , mailfrom: zhichao.gao@intel.com) IronPort-SDR: wGpCK9kjv0OPJUL3hxOK3QAPcFPATSKPjs6R5UFlFD95ho524op3wuckld/lGCcNDsuRBxlSwA iFEscq+3qj+Q== X-IronPort-AV: E=McAfee;i="6000,8403,9675"; a="127325785" X-IronPort-AV: E=Sophos;i="5.75,326,1589266800"; d="scan'208";a="127325785" X-Amp-Result: SKIPPED(no attachment in message) X-Amp-File-Uploaded: False Received: from fmsmga005.fm.intel.com ([10.253.24.32]) by fmsmga106.fm.intel.com with ESMTP/TLS/ECDHE-RSA-AES256-GCM-SHA384; 07 Jul 2020 19:27:35 -0700 IronPort-SDR: 9Jz8fcslphtva3Q5hm1/gnptRZy75OXffmvHkBUrX3a1ulhnDhXuaNFoKXrgihR0qeLttJ+caZ aQoO+orbBq2Q== X-ExtLoop1: 1 X-IronPort-AV: E=Sophos;i="5.75,326,1589266800"; d="scan'208";a="483722351" Received: from fieedk001.ccr.corp.intel.com ([10.239.33.114]) by fmsmga005.fm.intel.com with ESMTP; 07 Jul 2020 19:27:33 -0700 From: "Gao, Zhichao" To: devel@edk2.groups.io Cc: Hao A Wu , Ray Ni , Laszlo Ersek Subject: [PATCH V2 3/3] MdeModulePkg/PartitionDxe: Add already start check for child hanldes Date: Wed, 8 Jul 2020 10:27:22 +0800 Message-Id: <20200708022722.27024-4-zhichao.gao@intel.com> X-Mailer: git-send-email 2.21.0.windows.1 In-Reply-To: <20200708022722.27024-1-zhichao.gao@intel.com> References: <20200708022722.27024-1-zhichao.gao@intel.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit REF: https://bugzilla.tianocore.org/show_bug.cgi?id=2823 Treat the EFI_ALREADY_STARTED as EFI_SUCCESS to avoid the partition driver continuely check next routine function. Cc: Hao A Wu Cc: Ray Ni Cc: Laszlo Ersek Signed-off-by: Zhichao Gao --- MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c index d1c878ad2e..6a43c3cafb 100644 --- a/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c +++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Partition.c @@ -1276,6 +1276,15 @@ PartitionInstallChildHandle ( } else { FreePool (Private->DevicePath); FreePool (Private); + + // + // if the Status == EFI_ALREADY_STARTED, it means the child handles + // are already installed. So return EFI_SUCCESS to avoid do the next + // partition type check. + // + if (Status == EFI_ALREADY_STARTED) { + Status = EFI_SUCCESS; + } } return Status; -- 2.21.0.windows.1