Merge keystone/android12-5.10-keystone-qcom-release.149+ (d7eb21e) into msm-5.10

* refs/heads/tmp-d7eb21e:
  ANDROID: mm/filemap: Fix missing put_page() for speculative page fault

Change-Id: I6cff35f18c8f1e6d1178113c39e67be9ba624119
Signed-off-by: Sivasri Kumar, Vanka <quic_svanka@quicinc.com>
Signed-off-by: Srinivasarao Pathipati <quic_c_spathi@quicinc.com>
This commit is contained in:
Sivasri Kumar, Vanka 2023-03-04 17:50:00 +05:30 committed by Srinivasarao Pathipati
commit ab0dd5020b
2 changed files with 9 additions and 4 deletions

View File

@ -1,4 +1,4 @@
android12-5.10-2023-01_r3
android12-5.10-2023-01_r4
29a1d5a3718d31d58b9e7f419834d6bcb6c6669f
3fc09c682a84756c4ed807d6d1bb36abda2f531f

View File

@ -2736,11 +2736,14 @@ vm_fault_t filemap_fault(struct vm_fault *vmf)
if (vmf->flags & FAULT_FLAG_SPECULATIVE) {
page = find_get_page(mapping, offset);
if (unlikely(!page) || unlikely(PageReadahead(page)))
if (unlikely(!page))
return VM_FAULT_RETRY;
if (unlikely(PageReadahead(page)))
goto page_put;
if (!trylock_page(page))
return VM_FAULT_RETRY;
goto page_put;
if (unlikely(compound_head(page)->mapping != mapping))
goto page_unlock;
@ -2772,6 +2775,8 @@ vm_fault_t filemap_fault(struct vm_fault *vmf)
return VM_FAULT_LOCKED;
page_unlock:
unlock_page(page);
page_put:
put_page(page);
return VM_FAULT_RETRY;
}