]> git.ipfire.org Git - people/ms/linux.git/blobdiff - arch/x86/kernel/cpu/sgx/encl.c
x86/sgx: Disconnect backing page references from dirty status
[people/ms/linux.git] / arch / x86 / kernel / cpu / sgx / encl.c
index 7c63a1911fae977b7c00367a659e3958f7fcccc4..398695a206050aa62742aa376fddd0f7b6167709 100644 (file)
@@ -94,7 +94,7 @@ static int __sgx_encl_eldu(struct sgx_encl_page *encl_page,
        kunmap_atomic(pcmd_page);
        kunmap_atomic((void *)(unsigned long)pginfo.contents);
 
-       sgx_encl_put_backing(&b, false);
+       sgx_encl_put_backing(&b);
 
        sgx_encl_truncate_backing_page(encl, page_index);
 
@@ -645,15 +645,9 @@ int sgx_encl_get_backing(struct sgx_encl *encl, unsigned long page_index,
 /**
  * sgx_encl_put_backing() - Unpin the backing storage
  * @backing:   data for accessing backing storage for the page
- * @do_write:  mark pages dirty
  */
-void sgx_encl_put_backing(struct sgx_backing *backing, bool do_write)
+void sgx_encl_put_backing(struct sgx_backing *backing)
 {
-       if (do_write) {
-               set_page_dirty(backing->pcmd);
-               set_page_dirty(backing->contents);
-       }
-
        put_page(backing->pcmd);
        put_page(backing->contents);
 }