summaryrefslogtreecommitdiff
path: root/Kernel/VM/InodeVMObject.h
diff options
context:
space:
mode:
authorAndreas Kling <kling@serenityos.org>2020-05-08 22:10:47 +0200
committerAndreas Kling <kling@serenityos.org>2020-05-08 22:10:47 +0200
commit55f61c00049e928f1eb2e14c6509372591849991 (patch)
treeb2462d727863ef9b625a3ff5a3302ed1e184e165 /Kernel/VM/InodeVMObject.h
parent239fd334059823619e0af199e9b5618a320e15f9 (diff)
downloadserenity-55f61c00049e928f1eb2e14c6509372591849991.zip
Kernel: Add for_each_vmobject_of_type<T>
This makes iterating over a specific type of VMObjects a bit nicer.
Diffstat (limited to 'Kernel/VM/InodeVMObject.h')
-rw-r--r--Kernel/VM/InodeVMObject.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/Kernel/VM/InodeVMObject.h b/Kernel/VM/InodeVMObject.h
index 5ec9013bac..ca5f0af6e7 100644
--- a/Kernel/VM/InodeVMObject.h
+++ b/Kernel/VM/InodeVMObject.h
@@ -66,4 +66,10 @@ protected:
Bitmap m_dirty_pages;
};
+template<>
+inline bool is<InodeVMObject>(const VMObject& vmobject)
+{
+ return vmobject.is_inode();
+}
+
}