mirror of
https://github.com/Fishwaldo/linux-bl808.git
synced 2025-06-17 20:25:19 +00:00
[S390] merge page_test_dirty and page_clear_dirty
The page_clear_dirty primitive always sets the default storage key which resets the access control bits and the fetch protection bit. That will surprise a KVM guest that sets non-zero access control bits or the fetch protection bit. Merge page_test_dirty and page_clear_dirty back to a single function and only clear the dirty bit from the storage key. In addition move the function page_test_and_clear_dirty and page_test_and_clear_young to page.h where they belong. This requires to change the parameter from a struct page * to a page frame number. Signed-off-by: Martin Schwidefsky <schwidefsky@de.ibm.com>
This commit is contained in:
parent
c26001d4e9
commit
2d42552d1c
5 changed files with 68 additions and 71 deletions
|
@ -308,7 +308,7 @@ static inline void SetPageUptodate(struct page *page)
|
|||
{
|
||||
#ifdef CONFIG_S390
|
||||
if (!test_and_set_bit(PG_uptodate, &page->flags))
|
||||
page_clear_dirty(page, 0);
|
||||
page_set_storage_key(page_to_pfn(page), PAGE_DEFAULT_KEY, 0);
|
||||
#else
|
||||
/*
|
||||
* Memory barrier must be issued before setting the PG_uptodate bit,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue