From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-183.mta1.migadu.com (out-183.mta1.migadu.com [95.215.58.183]) (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 A606930B525 for ; Thu, 16 Jul 2026 12:45:16 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.183 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784205919; cv=none; b=CmDiXoE/P9CRkQNCqCXJei7pktxPVd5FJex2qjJpC6LM1fO7B7fk7ktNMlk23GudLgSEvZHEEalULHdkn8Ir9fJCw4DaoiNCD4AwZoJlDHtHXY+F+fc8qzI7qvAWk8O7ovLS4vzyuMHPZMkIU0n9LOKmi5W3G8WLZkb/ecR+IUU= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1784205919; c=relaxed/simple; bh=mAdh61/IdAY6HINlftaw7ebjEcDG1sXMHwhAvXBz7mE=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=N12OqYjiZ64tfcew+yMFLyECpUYofk49pQUq0pvnRFXg4j1kVAhgidFCCgN+UqJgGUUbb6FTzfI6x2DBSo+HTmoL20EWD/IMNkOYJ5xsriBBAkihinPzWlMj+KU2W3JcHZ6fajJL1h3rolp4rxOWVsz+ns51Sun+zj+GEDMQwLw= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev; spf=pass smtp.mailfrom=linux.dev; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b=CpVTrgCI; arc=none smtp.client-ip=95.215.58.183 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linux.dev Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linux.dev Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux.dev header.i=@linux.dev header.b="CpVTrgCI" Message-ID: <1d9d6fe5-3414-43c6-9073-d4d6508ac6a8@linux.dev> DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1784205914; 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: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=rxWBQiwgJMv8m9ergC38r1JkaLkub3PyBl4jNFNbnUk=; b=CpVTrgCIFahzrsWip7msymPoq5jnFXWdkYRoRtrdbLC8GoAWnGzbHWJ3WweVXX0njIkjUP xjfOi9cHO59ZUJ/UDi4vA4BE0NG/8pRNllmBEtTQWBwPb+PE8fj100rlMoq58PVUDSxwAE KjJN4FPaDYb6vqNwGTUhb/+LHJqzB6M= Date: Thu, 16 Jul 2026 20:44:51 +0800 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Subject: Re: [PATCH] mm/swap: Fix swap_cluster_lock() !CONFIG_SWAP stub signature mismatch To: Kairui Song Cc: akpm@linux-foundation.org, chrisl@kernel.org, shikemeng@huaweicloud.com, nphamcs@gmail.com, baoquan.he@linux.dev, baohua@kernel.org, youngjun.park@lge.com, linux-mm@kvack.org, linux-kernel@vger.kernel.org, Hongfu Li References: <20260716085131.68378-1-hongfu.li@linux.dev> X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. From: Hongfu Li In-Reply-To: Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT 在 2026/7/16 17:47, Kairui Song 写道: > On Thu, Jul 16, 2026 at 4:56 PM Hongfu Li wrote: >> From: Hongfu Li >> >> The !CONFIG_SWAP stub for swap_cluster_lock() has mismatched prototype: >> it has an extra unused irq argument and uses pgoff_t instead of unsigned >> long for offset. All callers are under CONFIG_SWAP so the extra parameter >> is dead. >> >> Sync the stub signature with the real function. >> >> Fixes: 8578e0c00dcf ("mm, swap: use the swap table for the swap cache and switch API") >> Signed-off-by: Hongfu Li >> --- >> mm/swap.h | 2 +- >> 1 file changed, 1 insertion(+), 1 deletion(-) >> >> diff --git a/mm/swap.h b/mm/swap.h >> index 77d2d14eda42..2c4667662601 100644 >> --- a/mm/swap.h >> +++ b/mm/swap.h >> @@ -337,7 +337,7 @@ static inline unsigned int folio_swap_flags(struct folio *folio) >> #else /* CONFIG_SWAP */ >> struct swap_iocb; >> static inline struct swap_cluster_info *swap_cluster_lock( >> - struct swap_info_struct *si, pgoff_t offset, bool irq) >> + struct swap_info_struct *si, unsigned long offset) > Thanks, nice catch. I didn't see any build failure report, it seems > swap_cluster_lock is never used with !CONFIG_SWAP? In that case we can > just delete this redundant declaration. Agreed. |swap_cluster_lock| is never referenced under |!CONFIG_SWAP|, so this declaration is redundant. I will drop it in v2.