Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/external/bsd/drm2/include/linux set_page_dirty: take the...



details:   https://anonhg.NetBSD.org/src/rev/916cd36adb48
branches:  trunk
changeset: 467214:916cd36adb48
user:      ad <ad%NetBSD.org@localhost>
date:      Fri Jan 17 20:09:47 2020 +0000

description:
set_page_dirty: take the vmobjlock if present

diffstat:

 sys/external/bsd/drm2/include/linux/mm.h |  12 ++++++++++--
 1 files changed, 10 insertions(+), 2 deletions(-)

diffs (27 lines):

diff -r 61384f60b967 -r 916cd36adb48 sys/external/bsd/drm2/include/linux/mm.h
--- a/sys/external/bsd/drm2/include/linux/mm.h  Fri Jan 17 20:08:06 2020 +0000
+++ b/sys/external/bsd/drm2/include/linux/mm.h  Fri Jan 17 20:09:47 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: mm.h,v 1.10 2020/01/15 17:55:44 ad Exp $       */
+/*     $NetBSD: mm.h,v 1.11 2020/01/17 20:09:47 ad Exp $       */
 
 /*-
  * Copyright (c) 2013 The NetBSD Foundation, Inc.
@@ -95,8 +95,16 @@
 static inline void
 set_page_dirty(struct page *page)
 {
+       struct vm_page *pg = &page->p_vmp;
 
-       uvm_pagemarkdirty(&page->p_vmp, UVM_PAGE_STATUS_DIRTY);
+       /* XXX */
+       if (pg->uobject != NULL) {
+               mutex_enter(pg->uobject->vmobjlock);
+               uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY);
+               mutex_exit(pg->uobject->vmobjlock);
+       } else {
+               uvm_pagemarkdirty(pg, UVM_PAGE_STATUS_DIRTY);
+       }
 }
 
 #endif  /* _LINUX_MM_H_ */



Home | Main Index | Thread Index | Old Index