mirror of
https://github.com/hardkernel/linux.git
synced 2026-06-07 03:15:31 +09:00
ANDROID: khugepaged: fix mixing declarations warning in retract_page_tables
vm_write_begin() was added before variable definition, producing a
"mixing declarations and code is a C99 extension" warning. Fix by
rearranging the code.
Fixes: ("ANDROID: mm/khugepaged: add missing vm_write_{begin|end}")
Bug: 257443051
Change-Id: I6e85ccfabd5e37b1397c654d61d0b8177326c3d8
Signed-off-by: Suren Baghdasaryan <surenb@google.com>
This commit is contained in:
@@ -1605,8 +1605,9 @@ static void retract_page_tables(struct address_space *mapping, pgoff_t pgoff)
|
|||||||
*/
|
*/
|
||||||
if (mmap_write_trylock(mm)) {
|
if (mmap_write_trylock(mm)) {
|
||||||
if (!khugepaged_test_exit(mm)) {
|
if (!khugepaged_test_exit(mm)) {
|
||||||
|
spinlock_t *ptl;
|
||||||
vm_write_begin(vma);
|
vm_write_begin(vma);
|
||||||
spinlock_t *ptl = pmd_lock(mm, pmd);
|
ptl = pmd_lock(mm, pmd);
|
||||||
/* assume page table is clear */
|
/* assume page table is clear */
|
||||||
_pmd = pmdp_collapse_flush(vma, addr, pmd);
|
_pmd = pmdp_collapse_flush(vma, addr, pmd);
|
||||||
spin_unlock(ptl);
|
spin_unlock(ptl);
|
||||||
|
|||||||
Reference in New Issue
Block a user