* Make the page read-only so that we can clear the object flags. However, if * this is a nosync mmap then the object is likely to stay dirty so do not * mess with the page and do not clear the object flags. Returns TRUE if the * page should be flushed, and FALSE otherwise. */
| 976 | * page should be flushed, and FALSE otherwise. |
| 977 | */ |
| 978 | static boolean_t |
| 979 | vm_object_page_remove_write(vm_page_t p, int flags, boolean_t *allclean) |
| 980 | { |
| 981 | |
| 982 | vm_page_assert_busied(p); |
| 983 | |
| 984 | /* |
| 985 | * If we have been asked to skip nosync pages and this is a |
| 986 | * nosync page, skip it. Note that the object flags were not |
| 987 | * cleared in this case so we do not have to set them. |
| 988 | */ |
| 989 | if ((flags & OBJPC_NOSYNC) != 0 && (p->a.flags & PGA_NOSYNC) != 0) { |
| 990 | *allclean = FALSE; |
| 991 | return (FALSE); |
| 992 | } else { |
| 993 | pmap_remove_write(p); |
| 994 | return (p->dirty != 0); |
| 995 | } |
| 996 | } |
| 997 | |
| 998 | /* |
| 999 | * vm_object_page_clean |
no test coverage detected