Merge tag 'mm-stable-2024-05-17-19-19' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / include / linux / secretmem.h
index acf7e1a3f3def9fd4027aa659ba1d4dec8e944b0..e918f96881f569a4c334346a274c342ff97834ed 100644 (file)
@@ -6,25 +6,8 @@
 
 extern const struct address_space_operations secretmem_aops;
 
-static inline bool folio_is_secretmem(struct folio *folio)
+static inline bool secretmem_mapping(struct address_space *mapping)
 {
-       struct address_space *mapping;
-
-       /*
-        * Using folio_mapping() is quite slow because of the actual call
-        * instruction.
-        * We know that secretmem pages are not compound, so we can
-        * save a couple of cycles here.
-        */
-       if (folio_test_large(folio))
-               return false;
-
-       mapping = (struct address_space *)
-               ((unsigned long)folio->mapping & ~PAGE_MAPPING_FLAGS);
-
-       if (!mapping || mapping != folio->mapping)
-               return false;
-
        return mapping->a_ops == &secretmem_aops;
 }
 
@@ -38,7 +21,7 @@ static inline bool vma_is_secretmem(struct vm_area_struct *vma)
        return false;
 }
 
-static inline bool folio_is_secretmem(struct folio *folio)
+static inline bool secretmem_mapping(struct address_space *mapping)
 {
        return false;
 }