The patch titled Subject: fs: proc: store PDE()->data into inode->i_private has been removed from the -mm tree. Its filename was fs-proc-store-pde-data-into-inode-i_private.patch This patch was dropped because an updated version will be merged ------------------------------------------------------ From: Muchun Song <songmuchun@xxxxxxxxxxxxx> Subject: fs: proc: store PDE()->data into inode->i_private Patch series "remove PDE_DATA()". I found a bug [1] some days ago, which is because we want to use inode->i_private to pass user private data. However, this is wrong on proc fs. We provide a specific function PDE_DATA() to get user private data. Actually, we can hide this detail by storing PDE()->data into inode->i_private and removing PDE_DATA() completely. The user could use inode->i_private to get user private data just like debugfs does. This series is trying to remove PDE_DATA(). [1] https://lore.kernel.org/lkml/20211029032638.84884-1-songmuchun@xxxxxxxxxxxxx/ This patch (of 4): PDE_DATA(inode) is introduced to get user private data and hide the layout of struct proc_dir_entry. The inode->i_private is used to do the same thing as well. Save a copy of user private data to inode-> i_private when proc inode is allocated. This means the user also can get their private data by inode->i_private. Link: https://lkml.kernel.org/r/20211101093518.86845-1-songmuchun@xxxxxxxxxxxxx Link: https://lkml.kernel.org/r/20211101093518.86845-2-songmuchun@xxxxxxxxxxxxx Signed-off-by: Muchun Song <songmuchun@xxxxxxxxxxxxx> Cc: Alexey Dobriyan <adobriyan@xxxxxxxxx> Cc: Alexey Gladkov <gladkov.alexey@xxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/proc/inode.c | 1 + 1 file changed, 1 insertion(+) --- a/fs/proc/inode.c~fs-proc-store-pde-data-into-inode-i_private +++ a/fs/proc/inode.c @@ -650,6 +650,7 @@ struct inode *proc_get_inode(struct supe return NULL; } + inode->i_private = de->data; inode->i_ino = de->low_ino; inode->i_mtime = inode->i_atime = inode->i_ctime = current_time(inode); PROC_I(inode)->pde = de; _ Patches currently in -mm which might be from songmuchun@xxxxxxxxxxxxx are mm-slab-make-slab-iterator-functions-static.patch mm-memcontrol-make-cgroup_memory_nokmem-static.patch mm-hugetlb-free-the-2nd-vmemmap-page-associated-with-each-hugetlb-page.patch mm-hugetlb-replace-hugetlb_free_vmemmap_enabled-with-a-static_key.patch mm-sparsemem-use-page-table-lock-to-protect-kernel-pmd-operations.patch selftests-vm-add-a-hugetlb-test-case.patch mm-sparsemem-move-vmemmap-related-to-hugetlb-to-config_hugetlb_page_free_vmemmap.patch fs-proc-replace-pde_datainode-with-inode-i_private.patch fs-proc-remove-pde_data.patch fs-proc-use-define_proc_show_attribute-to-simplify-the-code.patch