kernel: Set the shmem->inode field in query_shared_memory

This commit is contained in:
apio 2023-08-03 09:25:56 +02:00
parent f8e86b3b01
commit b447c1a261
Signed by: apio
GPG Key ID: B8A7D06E42258954

View File

@ -138,6 +138,8 @@ namespace TmpFS
{ {
u64 shmid = TRY(SharedMemory::create(m_data_buffer.data() + offset, offset, count)); u64 shmid = TRY(SharedMemory::create(m_data_buffer.data() + offset, offset, count));
m_shmid = shmid; m_shmid = shmid;
auto* shm = g_shared_memory_map.try_get_ref(shmid);
shm->inode = SharedPtr<VFS::Inode> { (VFS::Inode*)this };
return shmid; return shmid;
} }