diff mbox series

[v2,5/5] mm/hugetlb: remove unused variable pseudo_vma in remove_inode_hugepages()

Message ID 20210410072348.20437-6-linmiaohe@huawei.com (mailing list archive)
State New
Headers show
Series Cleanup and fixup for hugetlb | expand

Commit Message

Miaohe Lin April 10, 2021, 7:23 a.m. UTC
The local variable pseudo_vma is not used anymore.

Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
---
 fs/hugetlbfs/inode.c | 3 ---
 1 file changed, 3 deletions(-)

Comments

Mike Kravetz April 12, 2021, 6:51 p.m. UTC | #1
On 4/10/21 12:23 AM, Miaohe Lin wrote:
> The local variable pseudo_vma is not used anymore.
> 
> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>

Thanks,

That should have been removed with 1b426bac66e6 ("hugetlb: use same fault
hash key for shared and private mappings").

Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
Miaohe Lin April 13, 2021, 2:22 a.m. UTC | #2
On 2021/4/13 2:51, Mike Kravetz wrote:
> On 4/10/21 12:23 AM, Miaohe Lin wrote:
>> The local variable pseudo_vma is not used anymore.
>>
>> Signed-off-by: Miaohe Lin <linmiaohe@huawei.com>
> 
> Thanks,
> 
> That should have been removed with 1b426bac66e6 ("hugetlb: use same fault
> hash key for shared and private mappings").
> 

Yep. Many thanks for Reviewed-by tag! :)

> Reviewed-by: Mike Kravetz <mike.kravetz@oracle.com>
>
diff mbox series

Patch

diff --git a/fs/hugetlbfs/inode.c b/fs/hugetlbfs/inode.c
index d81f52b87bd7..a2a42335e8fd 100644
--- a/fs/hugetlbfs/inode.c
+++ b/fs/hugetlbfs/inode.c
@@ -463,14 +463,11 @@  static void remove_inode_hugepages(struct inode *inode, loff_t lstart,
 	struct address_space *mapping = &inode->i_data;
 	const pgoff_t start = lstart >> huge_page_shift(h);
 	const pgoff_t end = lend >> huge_page_shift(h);
-	struct vm_area_struct pseudo_vma;
 	struct pagevec pvec;
 	pgoff_t next, index;
 	int i, freed = 0;
 	bool truncate_op = (lend == LLONG_MAX);
 
-	vma_init(&pseudo_vma, current->mm);
-	pseudo_vma.vm_flags = (VM_HUGETLB | VM_MAYSHARE | VM_SHARED);
 	pagevec_init(&pvec);
 	next = start;
 	while (next < end) {