ram_disk: Add note about code duplication with ramfs.

This commit is contained in:
Augustin Cavalier
2019-08-31 20:38:18 -04:00
parent 181d68fbd4
commit 69c34116f0
@@ -651,6 +651,9 @@ private:
void _GetPages(off_t offset, off_t length, bool isWrite, vm_page** pages)
{
// TODO: This method is duplicated in ramfs' DataContainer. Perhaps it
// should be put into a common location?
// get the pages, we already have
AutoLocker<VMCache> locker(fCache);
@@ -701,6 +704,9 @@ private:
void _PutPages(off_t offset, off_t length, vm_page** pages, bool success)
{
// TODO: This method is duplicated in ramfs' DataContainer. Perhaps it
// should be put into a common location?
AutoLocker<VMCache> locker(fCache);
// Mark all pages unbusy. On error free the newly allocated pages.