Kernel: Don't require msync addresses to be page aligned
Inodes implementing msync can require page aligned addresses, but are also allowed to not :) This reduces sizes of framebuffer msyncs!
This commit is contained in:
parent
58e45fb394
commit
f206e72447
|
@ -1682,12 +1682,9 @@ namespace Kernel
|
|||
if (flags != MS_SYNC && flags != MS_ASYNC && flags != MS_INVALIDATE)
|
||||
return BAN::Error::from_errno(EINVAL);
|
||||
|
||||
vaddr_t vaddr = (vaddr_t)addr;
|
||||
if (vaddr % PAGE_SIZE != 0)
|
||||
return BAN::Error::from_errno(EINVAL);
|
||||
|
||||
LockGuard _(m_process_lock);
|
||||
|
||||
const vaddr_t vaddr = reinterpret_cast<vaddr_t>(addr);
|
||||
for (auto& mapped_region : m_mapped_regions)
|
||||
if (mapped_region->overlaps(vaddr, len))
|
||||
TRY(mapped_region->msync(vaddr, len, flags));
|
||||
|
|
Loading…
Reference in New Issue