From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-qv1-f42.google.com (mail-qv1-f42.google.com [209.85.219.42]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 45A4737FF58 for ; Thu, 14 May 2026 11:53:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.219.42 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778759589; cv=none; b=R23QLyIuH+t2VmQqoygmBGTxdWdQw38bU7khrEI7/k3yslMQYxMpqNpU2fz/Yr7n/6gpDqIdbwpn79G8/eLbdshfJjZ2IApAf0moKG3f8HWEE/5U8iL2aABYAJzv3obGJP6UBR6+3tx02Ud06jdBaGtsAciKF6Hc6k4JexpsAbU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778759589; c=relaxed/simple; bh=NAZ+7tU/aW5rVI3AoGCdnIgQQvyFD3Hx7JdW/noCRrs=; h=Date:From:To:Cc:Subject:Message-ID:References:MIME-Version: Content-Type:Content-Disposition:In-Reply-To; b=sS9u2qUo6T07ssoW98fcNgUj+LDRj4Zrpsu0yBcvHLnwAHRVNKmzSYBP2Ma1W+Y4pBFl4jDPQovoRagezwiznrbAi6ppLeGJVlv6/lOOUyamBgeu83AOHS7GSa42n7xruv3O/QKF1w/QZhYq2x9Fu1Z4As6XIk5HNRnMo3Fid08= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net; spf=pass smtp.mailfrom=gourry.net; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b=nbc3X8Im; arc=none smtp.client-ip=209.85.219.42 Authentication-Results: smtp.subspace.kernel.org; dmarc=none (p=none dis=none) header.from=gourry.net Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=gourry.net Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=gourry.net header.i=@gourry.net header.b="nbc3X8Im" Received: by mail-qv1-f42.google.com with SMTP id 6a1803df08f44-8b98482b253so105171926d6.1 for ; Thu, 14 May 2026 04:53:08 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gourry.net; s=google; t=1778759587; x=1779364387; 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=ty9zU0lNlVt9XsC+dbjcc2MTK2ZG8WC14RYLl53PeRE=; b=nbc3X8Im5mLPd1AyrLU8DmYMN3LBdMiP8wCniX0yVjTWaSDF5PvmNa7pKJfYtVpx7E 3oEL7ZuXhycTRRJUKNvTccprD02aTgwfftxItRSRgOc8LeDQvLvpUf2q0P01Zm/FBB6R 8BYIH3o+VT61wje/gO1/uoirf2vzAXf6IqXqAiD1M6I3Zo+8AYuu0JGYT8MGY55NO3VL TN4lsF74iiJoYCLEReDvFomCqd6eJYL5SXNJ6okr6AC5WA6sEE4jcrw+eEceZjaldR+Z RCzRWd+ksE5jbLKkiBSpl1g42SPlTwsIKcKsYYLfiqnugWaH0DY8a18H9mVpzi7qf/gf 4xcA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1778759587; x=1779364387; 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=ty9zU0lNlVt9XsC+dbjcc2MTK2ZG8WC14RYLl53PeRE=; b=Bsaowh7qrXBLen3ienM4IM+JSbfzI0SjcMioQZaVCpNnG1SedFxYf6jw8IkpWfnlk1 SpJx/phq7Xdwb1uH2D3eigc9z0z2+nqRrmTDmbWzgXIzcK7NJxFiW4sQORVq00i+nan+ biu5WlrSAgg1rZRSabP8wh8gCfhryFw3pZJ3zYxmWXg5Xh8PUEj/NiK3B7vWWPo0f5bW vDZ2odAn4ulSxMn0MXPmIERqDzMBQJYHTNxGD9uIQpXDH+e8UznyNGS6QgcDHKyckpHj N/NFTYoHzlyfXOvgZ2nkDF4pJIhNCAzwOOi3Oq+XE2I3wNKjY73+HpMIREcdck4xkTCp ULTA== X-Gm-Message-State: AOJu0Yz74aL6VKQ8v6rWgRLsQJXgLBZgGjDfCYVZrWEKTou7U3eLIW4y X5bG61C1yxUCKyedSFO8LCdNYD5hn4jc/SMbcdiDSiq8WjHkfo8rxWn0AHatEDhy74Y= X-Gm-Gg: Acq92OHiurzdw4E1jJLAlW2WVBi/J92VeBjiTeDdQNVPaSxhiSWj22oIKatpeg3fazZ PgRBLdHGbZZYfmdABl0sxwsvwUC9SDF8vRzD8zcUXIJ1V3ox/ctU7gCWbCsnD/KCb+64R+/5NJo 5TzPQOFQUG//qhjSSrVhzSv+5oT95PZsW/hsYkHAZrD1BBO7QNOvYXFyVo1Z08hFIEgyc+j+e5b q08Mb5EpJIMvZgTKhuP6wkjDoov9rYdKfUecBFdZib1K9Eaip3i2hfag4xDzqTUhUmAFdA8yAs7 hU5i5dFBb3+gorqFpP6FjP3wNPjmmd9uMwqiD64Qfsyca/YKSKwlQtgPFLAbhEwtatXaZP2eB47 4ZbVG1Oe+a7cWr8Rx9EEh5soTUuJCicBzA8kJMBfM/fdk1oiq+Nu8Fp64KEdRGtil2KiSGtZrwx FgCRyOakUbJhUrnLFOatzI+KtOdZJVT87PONnj0w2Fs6UYhmoR+eoqHvuzyD2mApHqZUmenJ6p1 E+xynyvOSYA X-Received: by 2002:a05:6214:2f90:b0:89c:bcbd:c26e with SMTP id 6a1803df08f44-8c7bb4b1e07mr116683036d6.25.1778759587110; Thu, 14 May 2026 04:53:07 -0700 (PDT) Received: from gourry-fedora-PF4VCD3F (pool-100-36-248-188.washdc.fios.verizon.net. [100.36.248.188]) by smtp.gmail.com with ESMTPSA id 6a1803df08f44-8c90c35cdb1sm21031116d6.46.2026.05.14.04.53.05 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 May 2026 04:53:06 -0700 (PDT) Date: Thu, 14 May 2026 07:53:04 -0400 From: Gregory Price To: "Michael S. Tsirkin" Cc: linux-kernel@vger.kernel.org, "David Hildenbrand (Arm)" , Jason Wang , Xuan Zhuo , Eugenio =?iso-8859-1?Q?P=E9rez?= , 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 , 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: Re: [PATCH v7 04/31] mm: hugetlb: remove dead alloc_hugetlb_folio stub Message-ID: References: <0143c5e2086fccb05703500c9269a899d4784768.1778616612.git.mst@redhat.com> 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: <0143c5e2086fccb05703500c9269a899d4784768.1778616612.git.mst@redhat.com> On Tue, May 12, 2026 at 05:05:26PM -0400, Michael S. Tsirkin wrote: > 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 Reviewed-by: Gregory Price