Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 0661a336 authored by Kirill A. Shutemov's avatar Kirill A. Shutemov Committed by Linus Torvalds
Browse files

mm: remove rest usage of VM_NONLINEAR and pte_file()



One bit in ->vm_flags is unused now!

Signed-off-by: default avatarKirill A. Shutemov <kirill.shutemov@linux.intel.com>
Cc: Dan Carpenter <dan.carpenter@oracle.com>
Cc: Michal Hocko <mhocko@suse.cz>
Signed-off-by: default avatarAndrew Morton <akpm@linux-foundation.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@linux-foundation.org>
parent ac51b934
Loading
Loading
Loading
Loading
+1 −2
Original line number Original line Diff line number Diff line
@@ -50,8 +50,7 @@
 *
 *
 * You must not use multiple offset managers on a single address_space.
 * You must not use multiple offset managers on a single address_space.
 * Otherwise, mm-core will be unable to tear down memory mappings as the VM will
 * Otherwise, mm-core will be unable to tear down memory mappings as the VM will
 * no longer be linear. Please use VM_NONLINEAR in that case and implement your
 * no longer be linear.
 * own offset managers.
 *
 *
 * This offset manager works on page-based addresses. That is, every argument
 * This offset manager works on page-based addresses. That is, every argument
 * and return code (with the exception of drm_vma_node_offset_addr()) is given
 * and return code (with the exception of drm_vma_node_offset_addr()) is given
+0 −1
Original line number Original line Diff line number Diff line
@@ -138,7 +138,6 @@ extern unsigned int kobjsize(const void *objp);
#define VM_ACCOUNT	0x00100000	/* Is a VM accounted object */
#define VM_ACCOUNT	0x00100000	/* Is a VM accounted object */
#define VM_NORESERVE	0x00200000	/* should the VM suppress accounting */
#define VM_NORESERVE	0x00200000	/* should the VM suppress accounting */
#define VM_HUGETLB	0x00400000	/* Huge TLB Page VM */
#define VM_HUGETLB	0x00400000	/* Huge TLB Page VM */
#define VM_NONLINEAR	0x00800000	/* Is non-linear (remap_file_pages) */
#define VM_ARCH_1	0x01000000	/* Architecture-specific flag */
#define VM_ARCH_1	0x01000000	/* Architecture-specific flag */
#define VM_ARCH_2	0x02000000
#define VM_ARCH_2	0x02000000
#define VM_DONTDUMP	0x04000000	/* Do not include in the core dump */
#define VM_DONTDUMP	0x04000000	/* Do not include in the core dump */
+1 −3
Original line number Original line Diff line number Diff line
@@ -54,7 +54,7 @@ static inline pgoff_t swp_offset(swp_entry_t entry)
/* check whether a pte points to a swap entry */
/* check whether a pte points to a swap entry */
static inline int is_swap_pte(pte_t pte)
static inline int is_swap_pte(pte_t pte)
{
{
	return !pte_none(pte) && !pte_present_nonuma(pte) && !pte_file(pte);
	return !pte_none(pte) && !pte_present_nonuma(pte);
}
}
#endif
#endif


@@ -66,7 +66,6 @@ static inline swp_entry_t pte_to_swp_entry(pte_t pte)
{
{
	swp_entry_t arch_entry;
	swp_entry_t arch_entry;


	BUG_ON(pte_file(pte));
	if (pte_swp_soft_dirty(pte))
	if (pte_swp_soft_dirty(pte))
		pte = pte_swp_clear_soft_dirty(pte);
		pte = pte_swp_clear_soft_dirty(pte);
	arch_entry = __pte_to_swp_entry(pte);
	arch_entry = __pte_to_swp_entry(pte);
@@ -82,7 +81,6 @@ static inline pte_t swp_entry_to_pte(swp_entry_t entry)
	swp_entry_t arch_entry;
	swp_entry_t arch_entry;


	arch_entry = __swp_entry(swp_type(entry), swp_offset(entry));
	arch_entry = __swp_entry(swp_type(entry), swp_offset(entry));
	BUG_ON(pte_file(__swp_entry_to_pte(arch_entry)));
	return __swp_entry_to_pte(arch_entry);
	return __swp_entry_to_pte(arch_entry);
}
}


+0 −1
Original line number Original line Diff line number Diff line
@@ -130,7 +130,6 @@ static const struct trace_print_flags vmaflags_names[] = {
	{VM_ACCOUNT,			"account"	},
	{VM_ACCOUNT,			"account"	},
	{VM_NORESERVE,			"noreserve"	},
	{VM_NORESERVE,			"noreserve"	},
	{VM_HUGETLB,			"hugetlb"	},
	{VM_HUGETLB,			"hugetlb"	},
	{VM_NONLINEAR,			"nonlinear"	},
#if defined(CONFIG_X86)
#if defined(CONFIG_X86)
	{VM_PAT,			"pat"		},
	{VM_PAT,			"pat"		},
#elif defined(CONFIG_PPC)
#elif defined(CONFIG_PPC)
+1 −1
Original line number Original line Diff line number Diff line
@@ -55,7 +55,7 @@ static struct page *follow_page_pte(struct vm_area_struct *vma,
		 */
		 */
		if (likely(!(flags & FOLL_MIGRATION)))
		if (likely(!(flags & FOLL_MIGRATION)))
			goto no_page;
			goto no_page;
		if (pte_none(pte) || pte_file(pte))
		if (pte_none(pte))
			goto no_page;
			goto no_page;
		entry = pte_to_swp_entry(pte);
		entry = pte_to_swp_entry(pte);
		if (!is_migration_entry(entry))
		if (!is_migration_entry(entry))
Loading