mm-commits.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [failures] mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch removed from -mm tree
@ 2020-11-18  0:25 akpm
  0 siblings, 0 replies; only message in thread
From: akpm @ 2020-11-18  0:25 UTC (permalink / raw)
  To: hughd, mm-commits, sh_def


The patch titled
     Subject: mm/shmem: use kmem_cache_zalloc in shmem_alloc_inode()
has been removed from the -mm tree.  Its filename was
     mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch

This patch was dropped because it had testing failures

------------------------------------------------------
From: Hui Su <sh_def@163.com>
Subject: mm/shmem: use kmem_cache_zalloc in shmem_alloc_inode()

in shmem_get_inode():
new_inode();
  new_inode_pseudo();
    alloc_inode();
      ops->alloc_inode(); -> shmem_alloc_inode()
        kmem_cache_alloc();

memset(info, 0, (char *)inode - (char *)info);

So use kmem_cache_zalloc() in shmem_alloc_inode(),
and remove the memset in shmem_get_inode().

Link: https://lkml.kernel.org/r/20201115174026.GA365412@rlk
Signed-off-by: Hui Su <sh_def@163.com>
Cc: Hugh Dickins <hughd@google.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 mm/shmem.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- a/mm/shmem.c~mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode
+++ a/mm/shmem.c
@@ -2331,7 +2331,6 @@ static struct inode *shmem_get_inode(str
 		inode->i_atime = inode->i_mtime = inode->i_ctime = current_time(inode);
 		inode->i_generation = prandom_u32();
 		info = SHMEM_I(inode);
-		memset(info, 0, (char *)inode - (char *)info);
 		spin_lock_init(&info->lock);
 		atomic_set(&info->stop_eviction, 0);
 		info->seals = F_SEAL_SEAL;
@@ -3851,7 +3850,7 @@ static struct kmem_cache *shmem_inode_ca
 static struct inode *shmem_alloc_inode(struct super_block *sb)
 {
 	struct shmem_inode_info *info;
-	info = kmem_cache_alloc(shmem_inode_cachep, GFP_KERNEL);
+	info = kmem_cache_zalloc(shmem_inode_cachep, GFP_KERNEL);
 	if (!info)
 		return NULL;
 	return &info->vfs_inode;
_

Patches currently in -mm which might be from sh_def@163.com are

mmslab_common-use-list_for_each_entry-in-dump_unreclaimable_slab.patch
mm-shmemc-make-shmem_mapping-inline.patch
mm-page_counter-use-page_counter_read-in-page_counter_set_max.patch
mm-hugetlbc-just-use-put_page_testzero-instead-of-page_count.patch
mm-compaction-move-compaction_suitables-comment-to-right-place.patch
mm-oom_kill-change-comment-and-rename-is_dump_unreclaim_slabs.patch
acctc-use-elif-instead-of-end-and-elif.patch
mm-memcontrol-rewrite-mem_cgroup_page_lruvec.patch


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2020-11-18  0:25 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-18  0:25 [failures] mm-shmem-use-kmem_cache_zalloc-in-shmem_alloc_inode.patch removed from -mm tree akpm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).