From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from out-180.mta1.migadu.com (out-180.mta1.migadu.com [95.215.58.180]) (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 204B830C37A for ; Fri, 15 May 2026 01:58:04 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=95.215.58.180 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778810286; cv=none; b=u9sIs3ngzhDc39F9KmfwMhfmKP1JpA0eY0yZ3p1XXVFSwowgh9A9jVXYmUCb6qVGyGIXfcIlwLH8Hcdvp+vd8jwfZkTnCHFQTpbpGtrEzsQfQxrRv9mQkF4S6fnWeUPFsx3eBabCkzUG7t+q18PTpFAUYrjVfkEbvAMV2Fm6M2o= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778810286; c=relaxed/simple; bh=GHVHK47vcjftNsYHtIsLimJpXemvPgvET3XCkltt6fc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version:Content-type; b=PDrOyU49PA6Iz82Fyp9DKaGVMj6WoyQVc7fb/utyv9b+OEgkRF1Nt/hxVIk23cfcFKFM44PymuKFaWE7aWqQwS6jjL8cbf8BpiPvx2AIsIpTRSIGtQESfIafHPeFoIwSlrFIf7hzVIZyg7N077QhzwrCOtI525teGzIIKI3bMUY= 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=XmcUqg9r; arc=none smtp.client-ip=95.215.58.180 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="XmcUqg9r" X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux.dev; s=key1; t=1778810283; 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=ma9rC7Uc9wawJfY5OVvtdjq6Z8aOUOjvo79XUTZ+mxA=; b=XmcUqg9roSeW6RY6JXgXoMBP6xs0eeXvWpov4g/feuF2HLPZdr1oWpdJeTKJxHu7JGQ237 gL0CPCRKABbmkCMSY81i/N/j1/IMCe5iVJsN40dOGECxgqrhcoKQGk4FRCYkM6vqU2oOYl qoJFWt8o8eABbtVI4WIkZNFIzZKtxUg= From: Baoquan He To: linux-mm@kvack.org Cc: akpm@linux-foundation.org, chrisl@kernel.org, usama.arif@linux.dev, baohua@kernel.org, kasong@tencent.com, nphamcs@gmail.com, shikemeng@huaweicloud.com, youngjun.park@lge.com, hch@infradead.org, linux-kernel@vger.kernel.org, Baoquan He Subject: [PATCH v7 2/3] mm/page_io.c: rename page_io functions to consistent naming Date: Fri, 15 May 2026 09:57:36 +0800 Message-ID: <20260515015737.890994-3-baoquan.he@linux.dev> In-Reply-To: <20260515015737.890994-1-baoquan.he@linux.dev> References: <20260515015737.890994-1-baoquan.he@linux.dev> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-type: text/plain Content-Transfer-Encoding: 8bit X-Migadu-Flow: FLOW_OUT Rename the swap I/O functions to use a consistent swap___ naming scheme, so the backend type immediately follows the swap_ prefix. The new names align with swap_ops callbacks: .write_folio and .read_folio. swap_writepage_fs -> swap_fs_write_folio swap_writepage_bdev_sync -> swap_bdev_sync_write_folio swap_writepage_bdev_async -> swap_bdev_async_write_folio swap_read_folio_fs -> swap_fs_read_folio swap_read_folio_bdev_sync -> swap_bdev_sync_read_folio swap_read_folio_bdev_async -> swap_bdev_async_read_folio Signed-off-by: Baoquan He --- mm/page_io.c | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/mm/page_io.c b/mm/page_io.c index 2b520af88376..38b94c560c37 100644 --- a/mm/page_io.c +++ b/mm/page_io.c @@ -378,7 +378,7 @@ static void sio_write_complete(struct kiocb *iocb, long ret) mempool_free(sio, sio_pool); } -static void swap_writepage_fs(struct swap_info_struct *sis, +static void swap_fs_write_folio(struct swap_info_struct *sis, struct folio *folio, struct swap_iocb **swap_plug) { @@ -415,7 +415,7 @@ static void swap_writepage_fs(struct swap_info_struct *sis, *swap_plug = sio; } -static void swap_writepage_bdev_sync(struct swap_info_struct *sis, +static void swap_bdev_sync_write_folio(struct swap_info_struct *sis, struct folio *folio, struct swap_iocb **plug) { @@ -436,7 +436,7 @@ static void swap_writepage_bdev_sync(struct swap_info_struct *sis, __end_swap_bio_write(&bio); } -static void swap_writepage_bdev_async(struct swap_info_struct *sis, +static void swap_bdev_async_write_folio(struct swap_info_struct *sis, struct folio *folio, struct swap_iocb **plug) { @@ -522,7 +522,7 @@ static bool swap_read_folio_zeromap(struct folio *folio) return true; } -static void swap_read_folio_fs(struct swap_info_struct *sis, +static void swap_fs_read_folio(struct swap_info_struct *sis, struct folio *folio, struct swap_iocb **plug) { @@ -557,7 +557,7 @@ static void swap_read_folio_fs(struct swap_info_struct *sis, *plug = sio; } -static void swap_read_folio_bdev_sync(struct swap_info_struct *sis, +static void swap_bdev_sync_read_folio(struct swap_info_struct *sis, struct folio *folio, struct swap_iocb **plug) { @@ -580,7 +580,7 @@ static void swap_read_folio_bdev_sync(struct swap_info_struct *sis, put_task_struct(current); } -static void swap_read_folio_bdev_async(struct swap_info_struct *sis, +static void swap_bdev_async_read_folio(struct swap_info_struct *sis, struct folio *folio, struct swap_iocb **plug) { @@ -597,18 +597,18 @@ static void swap_read_folio_bdev_async(struct swap_info_struct *sis, } static const struct swap_ops bdev_fs_swap_ops = { - .read_folio = swap_read_folio_fs, - .write_folio = swap_writepage_fs, + .read_folio = swap_fs_read_folio, + .write_folio = swap_fs_write_folio, }; static const struct swap_ops bdev_sync_swap_ops = { - .read_folio = swap_read_folio_bdev_sync, - .write_folio = swap_writepage_bdev_sync, + .read_folio = swap_bdev_sync_read_folio, + .write_folio = swap_bdev_sync_write_folio, }; static const struct swap_ops bdev_async_swap_ops = { - .read_folio = swap_read_folio_bdev_async, - .write_folio = swap_writepage_bdev_async, + .read_folio = swap_bdev_async_read_folio, + .write_folio = swap_bdev_async_write_folio, }; int init_swap_ops(struct swap_info_struct *sis) -- 2.52.0