From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from smtp.kernel.org (aws-us-west-2-korg-mail-alma10-1.taild15c8.ts.net [100.103.45.18]) (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 0D8F9364042 for ; Mon, 14 Sep 2026 03:52:19 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=100.103.45.18 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789357941; cv=none; b=jGE1tKj8gILHgMqF/7Mtw0NVzsXYeJAKTgXAwTPXdk/BPpoUWL7mU4cug4nrqjIExpcocaCOBF3QWglUq2XNaQaQUZjv1eg0+7+KacNu2CyiYfOlNr1OmW6nasLIieEFgdBOSoQRXF7Az7c/lFOEu64A0iuHKpMcflRg5NDX1oA= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1789357941; c=relaxed/simple; bh=3VBn4ezyBf+W2JnfTYPMWw2v6eZfAT0CSxLZEbweWjY=; h=Date:To:From:Subject:Message-Id; b=IerMBsCykntJu4D3qUElJPuqu2exfVak9H+fWhE9HFGvQ+nJ8ryI2A7ik3IGMQP6HfA3FtjZIBKYtn1q1UuFUZllIvi7yJ8a9MFJTGPZRgs4xUYm1xi9b+eRp28OWjzpnlPqAXfSbh2nzn0t+mXLxWB4JB4QT7XC++ORzsHlz50= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b=cxTey86B; arc=none smtp.client-ip=100.103.45.18 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=linux-foundation.org header.i=@linux-foundation.org header.b="cxTey86B" Received: by smtp.kernel.org (Postfix) with ESMTPSA id 8CA401F000FF; Mon, 14 Sep 2026 03:52:19 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linux-foundation.org; s=korg; t=1789357939; bh=ecZEUmAHCsM8YKY8ElvwM341+U5EjyUd+raOrijDg8E=; h=Date:To:From:Subject; b=cxTey86BarZI2B/Dv8Tr/Nt/r9oJaaP+MiscW/nnbCiVnsR2+xwcowbKDipTBYMIr +b/tQi2a28cGNDd+I9bf8VxEE+57/p9WkbOpeI9fvSr0TEOxadiHA246UXAGhO82KB G2xig096Ds8+HxI335zJyCx6Dljl8dUEcIluJ5hI= Date: Sun, 13 Sep 2026 20:52:19 -0700 To: mm-commits@vger.kernel.org,ying.huang@linux.alibaba.com,willy@infradead.org,trondmy@kernel.org,rakie.kim@sk.com,matthew.brost@intel.com,joshua.hahnjy@gmail.com,jack@suse.cz,gourry@gourry.net,david@kernel.org,byungchul@sk.com,apopple@nvidia.com,anna@kernel.org,ziy@nvidia.com,akpm@linux-foundation.org From: Andrew Morton Subject: + treewide-remove-folio_set-clear_private-usage.patch added to mm-new branch Message-Id: <20260914035219.8CA401F000FF@smtp.kernel.org> Precedence: bulk X-Mailing-List: mm-commits@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: The patch titled Subject: treewide: remove folio_set/clear_private() usage has been added to the -mm mm-new branch. Its filename is treewide-remove-folio_set-clear_private-usage.patch This patch will shortly appear at https://git.kernel.org/pub/scm/linux/kernel/git/akpm/25-new.git/tree/patches/treewide-remove-folio_set-clear_private-usage.patch This patch will later appear in the mm-new branch at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm Note, mm-new is a provisional staging ground for work-in-progress patches, and acceptance into mm-new is a notification for others take notice and to finish up reviews. Please do not hesitate to respond to review feedback and post updated versions to replace or incrementally fixup patches in mm-new. The mm-new branch of mm.git is not included in linux-next If a few days of testing in mm-new is successful, the patch will me moved into mm.git's mm-unstable branch, which is included in linux-next Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/process/submit-checklist.rst when testing your code *** The -mm tree is included into linux-next via various branches at git://git.kernel.org/pub/scm/linux/kernel/git/akpm/mm and is updated there most days ------------------------------------------------------ From: Zi Yan Subject: treewide: remove folio_set/clear_private() usage Date: Sun, 13 Sep 2026 22:24:09 -0400 They are no-ops now. Remove them. Link: https://lore.kernel.org/20260913-remove-pg_private-v4-11-848550f7574e@nvidia.com Signed-off-by: Zi Yan Signed-off-by: Andrew Morton Acked-by: David Hildenbrand (Arm) Cc: Matthew Brost Cc: Joshua Hahn Cc: Rakie Kim Cc: Byungchul Park Cc: Gregory Price Cc: Ying Huang Cc: Alistair Popple Cc: Trond Myklebust Cc: Anna Schumaker Cc: "Matthew Wilcox (Oracle)" Cc: Jan Kara --- fs/nfs/write.c | 2 -- include/linux/pagemap.h | 4 +--- mm/migrate.c | 1 - 3 files changed, 1 insertion(+), 6 deletions(-) --- a/fs/nfs/write.c~treewide-remove-folio_set-clear_private-usage +++ a/fs/nfs/write.c @@ -717,7 +717,6 @@ static void nfs_inode_add_request(struct nfs_lock_request(req); spin_lock(&mapping->i_private_lock); set_bit(PG_MAPPED, &req->wb_flags); - folio_set_private(folio); folio->private = req; spin_unlock(&mapping->i_private_lock); atomic_long_inc(&nfsi->nrequests); @@ -745,7 +744,6 @@ static void nfs_inode_remove_request(str spin_lock(&mapping->i_private_lock); folio->private = NULL; - folio_clear_private(folio); clear_bit(PG_MAPPED, &req->wb_head->wb_flags); spin_unlock(&mapping->i_private_lock); --- a/include/linux/pagemap.h~treewide-remove-folio_set-clear_private-usage +++ a/include/linux/pagemap.h @@ -594,7 +594,6 @@ static inline void folio_attach_private( { folio_get(folio); folio->private = data; - folio_set_private(folio); } /** @@ -629,9 +628,8 @@ static inline void *folio_detach_private { void *data = folio_get_private(folio); - if (!folio_test_private(folio)) + if (!data) return NULL; - folio_clear_private(folio); folio->private = NULL; folio_put(folio); --- a/mm/migrate.c~treewide-remove-folio_set-clear_private-usage +++ a/mm/migrate.c @@ -835,7 +835,6 @@ void folio_migrate_flags(struct folio *n */ if (folio_test_swapcache(folio)) folio_clear_swapcache(folio); - folio_clear_private(folio); /* page->private contains hugetlb specific flags */ if (!folio_test_hugetlb(folio)) _ Patches currently in -mm which might be from ziy@nvidia.com are mm-zsmalloc-replace-pg_private-with-pointer-comparison.patch perf-ring_buffer-stop-using-pg_private-as-aux-page-high-order-marker.patch xen-grant-table-stop-setting-pg_private-on-pages-for-grant-mapping.patch fscrypt-stop-setting-pg_private-on-bounce-page.patch mm-hugetlb-use-direct-assignment-instead-of-folio_change_private.patch f2fs-stop-using-pg_private.patch f2fs-convert-the-private-flag-helpers-to-folio-only.patch erofs-mm-pagemap-add-readahead_folio_last-to-avoid-folio-private.patch erofs-use-folio_attach-detach_private-instead-of-direct-assignment.patch mm-page-flags-check-page-folio-private-instead-of-pg_private.patch treewide-remove-folio_set-clear_private-usage.patch ceph-replace-pageprivate-with-page_private.patch md-md-bitmap-replace-pageprivate-with-page_private.patch buffer-replace-page_buffer-with-page_private-and-delete-it.patch treewide-remove-pageprivate-and-pg_private-from-comments-and-docs.patch mm-page-flags-remove-pg_private.patch usb-gadgetfs-do-not-warn-about-excessively-large-memory-allocations.patch