From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from foss.arm.com (foss.arm.com [217.140.110.172]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 5317013A88A for ; Fri, 18 Oct 2024 09:42:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=217.140.110.172 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729244529; cv=none; b=o+QaQ2wqBOIZGLmMXFyCDu56Qxh1L+zCAkcNwbbqkBBb3WAW4uG+8nZF39DyNhE1aiQYd3Cmyo3d8icKTb9OBG3S/Gj+9yxnhdW45iENaVQYqJmCo5rbP2FrBl98F501U/b33gNVmFEcmCzmgzPx5Rez9BaBxvxUoNL3c+NdhcM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1729244529; c=relaxed/simple; bh=jwAIih57R/tM3+G9W9d0yXNedUY6FlEFtzQk9HQKdFM=; h=From:To:Cc:Subject:Date:Message-Id:MIME-Version; b=RLcJn6Isz11n1XlmJlGKcWDE63f4Km+yGPCUMS43FntrSOCD3w7pfB5J8/9++YUvxoj6M/RWccBRWpv3kd+bOmyA7RAPWk4H49dMMVWRcSzkQOCPfAmTsWCHAWh4uNsS8wQLSHE5sEQiI/jqNW/53yMEvGTKg3Ec9pCKOQFda50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com; spf=pass smtp.mailfrom=arm.com; arc=none smtp.client-ip=217.140.110.172 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=arm.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=arm.com Received: from usa-sjc-imap-foss1.foss.arm.com (unknown [10.121.207.14]) by usa-sjc-mx-foss1.foss.arm.com (Postfix) with ESMTP id 67F11FEC; Fri, 18 Oct 2024 02:42:37 -0700 (PDT) Received: from K4MQJ0H1H2.arm.com (unknown [10.163.66.210]) by usa-sjc-imap-foss1.foss.arm.com (Postfix) with ESMTPA id 7624E3F58B; Fri, 18 Oct 2024 02:42:04 -0700 (PDT) From: Dev Jain To: akpm@linux-foundation.org, david@redhat.com, willy@infradead.org Cc: ziy@nvidia.com, ying.huang@intel.com, linux-kernel@vger.kernel.org, linux-mm@kvack.org, Dev Jain Subject: [PATCH] mm: Remove redundant condition for THP folio Date: Fri, 18 Oct 2024 15:11:51 +0530 Message-Id: <20241018094151.3458-1-dev.jain@arm.com> X-Mailer: git-send-email 2.39.3 (Apple Git-146) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit folio_test_pmd_mappable() implies folio_test_large(), therefore, simplify the expression for is_thp. Signed-off-by: Dev Jain --- mm/migrate.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/mm/migrate.c b/mm/migrate.c index df91248755e4..b43e7b105559 100644 --- a/mm/migrate.c +++ b/mm/migrate.c @@ -1731,7 +1731,7 @@ static int migrate_pages_batch(struct list_head *from, list_for_each_entry_safe(folio, folio2, from, lru) { is_large = folio_test_large(folio); - is_thp = is_large && folio_test_pmd_mappable(folio); + is_thp = folio_test_pmd_mappable(folio); nr_pages = folio_nr_pages(folio); cond_resched(); -- 2.30.2