From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 083753C8C7D for ; Tue, 12 May 2026 21:05:36 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778619941; cv=none; b=GZ1YmRLm6RQmmXvbvnQ/tdfCAf5ls1ksu2zvIer75YtUnhcubWmHm0GwTQBKkC08q2ghpOPsgCUn0m8xOIvhZIoWriVRTw50TNtj5RH6wNWvru34LjVdTYoOFXMfA1LKlemebztstsixQ/wWP5wK+avfFbfr0XM8P5+nSVIo0VI= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778619941; c=relaxed/simple; bh=dbqodEtBSdW6l7fSNG3X+ow9g33S1jhVrQg2Ca7vU3g=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=MTmLXlHeEsL43s/Ms9QsnpHV35C5NTCeZdRh0wqs7CcnXxUuCMfE/y90wxEhBQJQPofCfxwrTcuzU2dqIN4XbkLK2Ai264nJEQIDpKOGQet5RgpYhcB0ZoMceHDiB0vfAN8WdEnd0axQLP6eBIliD3G+S119G1aEyWhU4e/3Ihk= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=PMuieYuK; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b=m3+528kk; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="PMuieYuK"; dkim=pass (2048-bit key) header.d=redhat.com header.i=@redhat.com header.b="m3+528kk" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778619935; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=73ni6E1OiylZPcnUbU0EX/Y/PdtoGvrjv7tOovuvhS8=; b=PMuieYuKXhiFHmBLLHCUUd9/jhGPGPS4n8QB+f2OrKOqv3ntvbZOr7u2ZEctrEVFCVDdzh AHTM+vHfi9wNk0CrN7P6ZYIgnQMpAUrwgi+H/84n9cJTHjKgd3hHUikHCB7HvvWEuDn/0a BmfvwrKRmGzotaYp3OZcXW8j/v1vw0A= Received: from mail-wr1-f71.google.com (mail-wr1-f71.google.com [209.85.221.71]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-605-EMFq8kIHMbCWbUphyKoilg-1; Tue, 12 May 2026 17:05:33 -0400 X-MC-Unique: EMFq8kIHMbCWbUphyKoilg-1 X-Mimecast-MFC-AGG-ID: EMFq8kIHMbCWbUphyKoilg_1778619932 Received: by mail-wr1-f71.google.com with SMTP id ffacd0b85a97d-43ff19e54beso4179559f8f.2 for ; Tue, 12 May 2026 14:05:33 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=google; t=1778619932; x=1779224732; darn=vger.kernel.org; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:from:to:cc:subject:date:message-id:reply-to; bh=73ni6E1OiylZPcnUbU0EX/Y/PdtoGvrjv7tOovuvhS8=; b=m3+528kkybn20FvN71Rjv3Knsbq8WuoC0sfBHcXmxuVWZYPiqUpAacyRBfxqDTj9Tf gcv7aBg1tkhUUfpoGdkudjrWCNTjtj6iYA1A3EKfQcLMEDxQHRKy0bwSQc3Y4AMnn/ft zue1qhnEicLMTFLYfTyNVbjMW3p3i+Cx6u9LaXiLorQpziMtWCALJcWgiyn97x3Ih1OA 0tlPXGICF5Slc9w7WaY9oqrAerb4ujwu0yVIRSgKRyYQXXkVcDSMiqwRhpv3z2HO5i/j 5vWJE3bV39eApy7JYyGSWrl/mfvLn3RaLzJhvnpP5XjNAP1E6B73R7mVc15gjIpt3V7e 3auQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778619932; x=1779224732; h=in-reply-to:content-disposition:mime-version:references:message-id :subject:cc:to:from:date:x-gm-gg:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=73ni6E1OiylZPcnUbU0EX/Y/PdtoGvrjv7tOovuvhS8=; b=W9lD0lj6CKBpdbVwlCC9lRKjKF4a79O37UwERygbgM9L4kFQlJ7xbh9gfu+ABUsgDT DLM8rfR6oXORJGRycB5MR2YpJRd54GLMFnBjaAnmuCTxPmKbDy4GXU3pqbNFirxuMrmC qKSOt4VdMl7JcDtk4mCa47hTIv8CtTW1ufMPmffpUm+gGX2gZwpt32cut2ZJ56/kBhnM 4ew0ZXM40cQz6VPYqA1LvqR9x7LvsgFlJyW0SBoR1jYqMPZWW1UFciE56tTH48ZG9Ti0 wbAnYJpIlslZJh73h5nIKbFwXfv8ZRP+AY58wQZFpGuwi5zTvP2VwICblNQ+/HhFstLZ nyPA== X-Gm-Message-State: AOJu0YyPs8WjYbsVqUuIZ9ErpowadyHvhwt7KrNXt0huWCRRmnl0gKFy 9EGDBwVrAK2UE5FyAUdhw1Cv0UHgznasxHn25fq6dSGUsepvwmGDaFn95tnzqH7khyEyzF/5/2O qy7gaNKQd2x8RfkWcD6JJsMxRnWrPc7vg8f6KOekbHCxkg21W4Lv/TF8rLTJnZNu0ZrdaK5BCAN XEX+uFDTE4E29DpA4kHpq2OLKGotSp8sHj13AeqqrYpPI= X-Gm-Gg: Acq92OGu5md8C0wNmqJ1VC5NpR1x5ib3BusyPNgZ2dIlHcs/fV63hgfQdFBHcroziQH UvA4jMAZW/TExRUwOCM6M5ucixv/itcjtTalcdOFR+/oaPhMawlP7Hq2fkGo3rKrh9lX5LiRwQt rbdoJo2cVSX2BaYRpgKCjRl/xsKRobjFq82jTo4fCQPGX5BWZT6ieMrwTEdXhQ821GLjVx05h4u xUx7dPb8pX+4T7R5iO6DUZ3m7jhyRhvtO6gRAWtXeyOg2ToTbRf4civyJZlhYs9zeuOIiLzuYaU 5l11TjYB3EeWSY2CNGckHWshDM8HCyPfrEK2b2mX2CK3QV5FogdRQ5wigrHm1hR5D0owzH94FL2 6FP1iAnBOGh7T7hLU1vImicfeY2DF0+u3IU/tiYYF X-Received: by 2002:a5d:64c6:0:b0:448:659b:abec with SMTP id ffacd0b85a97d-45c580ce38cmr505598f8f.8.1778619931881; Tue, 12 May 2026 14:05:31 -0700 (PDT) X-Received: by 2002:a5d:64c6:0:b0:448:659b:abec with SMTP id ffacd0b85a97d-45c580ce38cmr505522f8f.8.1778619931288; Tue, 12 May 2026 14:05:31 -0700 (PDT) Received: from redhat.com (IGLD-80-230-48-7.inter.net.il. [80.230.48.7]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-4548eb75c29sm34124809f8f.9.2026.05.12.14.05.27 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 12 May 2026 14:05:30 -0700 (PDT) Date: Tue, 12 May 2026 17:05:26 -0400 From: "Michael S. Tsirkin" To: linux-kernel@vger.kernel.org Cc: "David Hildenbrand (Arm)" , Jason Wang , Xuan Zhuo , Eugenio =?utf-8?B?UMOpcmV6?= , Muchun Song , Oscar Salvador , Andrew Morton , Lorenzo Stoakes , "Liam R. Howlett" , Vlastimil Babka , Mike Rapoport , Suren Baghdasaryan , Michal Hocko , Brendan Jackman , Johannes Weiner , Zi Yan , Baolin Wang , Nico Pache , Ryan Roberts , Dev Jain , Barry Song , Lance Yang , Hugh Dickins , Matthew Brost , Joshua Hahn , Rakie Kim , Byungchul Park , Gregory Price , Ying Huang , Alistair Popple , Christoph Lameter , David Rientjes , Roman Gushchin , Harry Yoo , Axel Rasmussen , Yuanchu Xie , Wei Xu , Chris Li , Kairui Song , Kemeng Shi , Nhat Pham , Baoquan He , virtualization@lists.linux.dev, linux-mm@kvack.org, Andrea Arcangeli Subject: [PATCH v7 04/31] mm: hugetlb: remove dead alloc_hugetlb_folio stub Message-ID: <0143c5e2086fccb05703500c9269a899d4784768.1778616612.git.mst@redhat.com> References: Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: X-Mailer: git-send-email 2.27.0.106.g8ac3dc51b1 X-Mutt-Fcc: =sent Remove the !CONFIG_HUGETLB_PAGE stub for alloc_hugetlb_folio(). The stub is dead code: all callers are in mm/hugetlb.c (CONFIG_HUGETLB_PAGE) or fs/hugetlbfs/inode.c (CONFIG_HUGETLBFS), and CONFIG_HUGETLB_PAGE is def_bool HUGETLBFS with nothing selecting it independently. The stub is also broken: it returns NULL, but all callers check IS_ERR(folio), so a NULL return would not be caught and would crash on the subsequent folio dereference. Remove it now since follow-up patches change the signature of alloc_hugetlb_folio and would otherwise need to update the broken stub too. Signed-off-by: Michael S. Tsirkin Assisted-by: Claude:claude-opus-4-6 --- include/linux/hugetlb.h | 7 ------- 1 file changed, 7 deletions(-) diff --git a/include/linux/hugetlb.h b/include/linux/hugetlb.h index 93418625d3c5..f016bc2e8936 100644 --- a/include/linux/hugetlb.h +++ b/include/linux/hugetlb.h @@ -1129,13 +1129,6 @@ static inline void wait_for_freed_hugetlb_folios(void) { } -static inline struct folio *alloc_hugetlb_folio(struct vm_area_struct *vma, - unsigned long addr, - bool cow_from_owner) -{ - return NULL; -} - static inline struct folio * alloc_hugetlb_folio_reserve(struct hstate *h, int preferred_nid, nodemask_t *nmask, gfp_t gfp_mask) -- MST