foo

From: Christoph Hellwig
Date: Wed Apr 22 2020 - 12:54:45 EST


---
arch/x86/include/asm/pgtable_types.h | 11 ++++++++---
1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/arch/x86/include/asm/pgtable_types.h b/arch/x86/include/asm/pgtable_types.h
index 7b6ddcf77d70..c6d4725269bb 100644
--- a/arch/x86/include/asm/pgtable_types.h
+++ b/arch/x86/include/asm/pgtable_types.h
@@ -485,7 +485,10 @@ static inline pgprotval_t protval_4k_2_large(pgprotval_t val)
}
static inline pgprot_t pgprot_4k_2_large(pgprot_t pgprot)
{
- return __pgprot(protval_4k_2_large(pgprot_val(pgprot)));
+ pgprot_t new;
+
+ pgprot_val(new) = protval_4k_2_large(pgprot_val(pgprot));
+ return new;
}
static inline pgprotval_t protval_large_2_4k(pgprotval_t val)
{
@@ -495,9 +498,11 @@ static inline pgprotval_t protval_large_2_4k(pgprotval_t val)
}
static inline pgprot_t pgprot_large_2_4k(pgprot_t pgprot)
{
- return __pgprot(protval_large_2_4k(pgprot_val(pgprot)));
-}
+ pgprot_t new;

+ pgprot_val(new) = protval_large_2_4k(pgprot_val(pgprot));
+ return new;
+}

typedef struct page *pgtable_t;

--
2.26.1


--LQksG6bCIzRHxTLp--