+ hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix.patch added to -mm tree

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



The patch titled
     Subject: hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix
has been added to the -mm tree.  Its filename is
     hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix.patch

This patch should soon appear at
    http://ozlabs.org/~akpm/mmots/broken-out/hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix.patch
and later at
    http://ozlabs.org/~akpm/mmotm/broken-out/hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix.patch

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 and is updated
there every 3-4 working days

------------------------------------------------------
From: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
Subject: hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix

various build fixes

Cc: Wei Yang <richardw.yang@xxxxxxxxxxxxxxx>
Cc: Mike Kravetz <mike.kravetz@xxxxxxxxxx>
Cc: Hugh Dickins <hughd@xxxxxxxxxx>
Cc: Andrea Arcangeli <aarcange@xxxxxxxxxx>
Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx>
---

 fs/hugetlbfs/inode.c    |    4 ++--
 include/linux/hugetlb.h |    3 +--
 mm/userfaultfd.c        |    3 +++
 3 files changed, 6 insertions(+), 4 deletions(-)

--- a/fs/hugetlbfs/inode.c~hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix
+++ a/fs/hugetlbfs/inode.c
@@ -440,7 +440,7 @@ static void remove_inode_hugepages(struc
 			u32 hash;
 
 			index = page->index;
-			hash = hugetlb_fault_mutex_hash(h, mapping, index);
+			hash = hugetlb_fault_mutex_hash(mapping, index);
 			mutex_lock(&hugetlb_fault_mutex_table[hash]);
 
 			/*
@@ -644,7 +644,7 @@ static long hugetlbfs_fallocate(struct f
 		addr = index * hpage_size;
 
 		/* mutex taken here, fault path and hole punch */
-		hash = hugetlb_fault_mutex_hash(h, mapping, index);
+		hash = hugetlb_fault_mutex_hash(mapping, index);
 		mutex_lock(&hugetlb_fault_mutex_table[hash]);
 
 		/* See if already present in mapping to avoid alloc/free */
--- a/include/linux/hugetlb.h~hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix
+++ a/include/linux/hugetlb.h
@@ -105,8 +105,7 @@ void move_hugetlb_state(struct page *old
 void free_huge_page(struct page *page);
 void hugetlb_fix_reserve_counts(struct inode *inode);
 extern struct mutex *hugetlb_fault_mutex_table;
-u32 hugetlb_fault_mutex_hash(struct hstate *h, struct address_space *mapping,
-				pgoff_t idx);
+u32 hugetlb_fault_mutex_hash(struct address_space *mapping, pgoff_t idx);
 
 pte_t *huge_pmd_share(struct mm_struct *mm, unsigned long addr, pud_t *pud);
 
--- a/mm/userfaultfd.c~hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix
+++ a/mm/userfaultfd.c
@@ -184,6 +184,7 @@ static __always_inline ssize_t __mcopy_a
 	unsigned long src_addr, dst_addr;
 	long copied;
 	struct page *page;
+	struct hstate *h;
 	unsigned long vma_hpagesize;
 	pgoff_t idx;
 	u32 hash;
@@ -255,6 +256,8 @@ retry:
 			goto out_unlock;
 	}
 
+	h = hstate_vma(dst_vma);
+
 	while (src_addr < src_start + len) {
 		pte_t dst_pteval;
 
_

Patches currently in -mm which might be from akpm@xxxxxxxxxxxxxxxxxxxx are

ocfs2-clear-zero-in-unaligned-direct-io-checkpatch-fixes.patch
fs-ocfs2-fix-possible-null-pointer-dereferences-in-ocfs2_xa_prepare_entry-fix.patch
mm-page_alloc-fix-a-crash-in-free_pages_prepare-fix.patch
mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix.patch
mm-vmpressure-fix-a-signedness-bug-in-vmpressure_register_event-fix-fix.patch
mm-slb-guarantee-natural-alignment-for-kmallocpower-of-two-fix.patch
ocfs2-protect-extent-tree-in-the-ocfs2_prepare_inode_for_write-checkpatch-fixes.patch
mm.patch
mm-slub-fix-a-deadlock-in-show_slab_objects-fix.patch
mm-pgmap-use-correct-alignment-when-looking-at-first-pfn-from-a-region-checkpatch-fixes.patch
mm-oom-avoid-printk-iteration-under-rcu-fix.patch
hugetlb-remove-duplicated-code-checkpatch-fixes.patch
hugetlb-remove-unused-hstate-in-hugetlb_fault_mutex_hash-fix.patch
linux-next-rejects.patch
linux-next-git-rejects.patch
diff-sucks.patch
drivers-tty-serial-sh-scic-suppress-warning.patch
kernel-forkc-export-kernel_thread-to-modules.patch




[Index of Archives]     [Kernel Archive]     [IETF Annouce]     [DCCP]     [Netdev]     [Networking]     [Security]     [Bugtraq]     [Yosemite]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux SCSI]

  Powered by Linux