ANDROID: export symbols for zram module
The zram module is being updated to allow initiating writeback on behalf of a specific userspace process. This requires the zram module to call several core kernel functions to access the process's memory map and walk its page tables. Export the following symbols so they can be used by the zram module: - mm_access: To get a reference to the process's mm_struct. - pidfd_get_task: To get the task_struct from a pidfd. - walk_page_range: To iterate over the process's page table entries. - __pte_offset_map_lock: To map and lock a PTE. - get_swap_device: To prevent the swapoff/swapon race condition This change is a prerequisite for adding the new per-process writeback ioctl to zram. This fixes the conflict and reland the following commits: - commitd169319e30- commite4e7aec478Bug: 421065577 Change-Id: I32bd1d050adfb000a4f0b32978c55a2a78a4d005 Signed-off-by: Richard Chang <richardycc@google.com>
This commit is contained in:
1 parent
6d7859a7b1
commit
a3654ae7c1
5 files changed
+5
No files matched your search
@@ -1420,6 +1420,7 @@ struct mm_struct *mm_access(struct task_struct *task, unsigned int mode)
|
||||
|
||||
return mm;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(mm_access);
|
||||
|
||||
static void complete_vfork_done(struct task_struct *tsk)
|
||||
{
|
||||
|
||||
@@ -601,6 +601,7 @@ struct task_struct *pidfd_get_task(int pidfd, unsigned int *flags)
|
||||
*flags = f_flags;
|
||||
return task;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(pidfd_get_task);
|
||||
|
||||
/**
|
||||
* pidfd_create() - Create a new pid file descriptor.
|
||||
|
||||
@@ -584,6 +584,7 @@ int walk_page_range(struct mm_struct *mm, unsigned long start,
|
||||
|
||||
return walk_page_range_mm_unsafe(mm, start, end, ops, private);
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(walk_page_range);
|
||||
|
||||
/**
|
||||
* walk_kernel_page_table_range - walk a range of kernel pagetables.
|
||||
|
||||
@@ -408,6 +408,7 @@ again:
|
||||
pte_unmap_unlock(pte, ptl);
|
||||
goto again;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(__pte_offset_map_lock);
|
||||
|
||||
#ifdef CONFIG_ASYNC_KERNEL_PGTABLE_FREE
|
||||
static void kernel_pgtable_work_func(struct work_struct *work);
|
||||
|
||||
@@ -1613,6 +1613,7 @@ put_out:
|
||||
percpu_ref_put(&si->users);
|
||||
return NULL;
|
||||
}
|
||||
EXPORT_SYMBOL_GPL(get_swap_device);
|
||||
|
||||
static void swap_entries_put_cache(struct swap_info_struct *si,
|
||||
swp_entry_t entry, int nr)
|
||||
|
||||
Reference in new issue
Block a user