fs/dlm/memory.c
Source file repositories/reference/linux-study-clean/fs/dlm/memory.c
File Facts
- System
- Linux kernel
- Corpus path
fs/dlm/memory.c- Extension
.c- Size
- 3966 bytes
- Lines
- 180
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: implementation source
- Status
- source implementation candidate
Why This File Exists
Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Core operating-system implementation surface: boot, tasks, memory, VFS, syscall-facing interfaces, synchronization, credentials, and isolation.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
dlm_internal.hmidcomms.hlowcomms.hconfig.hmemory.hast.h
Detected Declarations
function dlm_memory_initfunction dlm_memory_exitfunction dlm_free_lvbfunction __free_rsb_rcufunction dlm_free_rsbfunction __free_lkb_rcufunction dlm_free_lkbfunction dlm_free_mhandlefunction dlm_free_writequeuefunction dlm_free_msgfunction dlm_free_cb
Annotated Snippet
if (ua) {
kfree(ua->lksb.sb_lvbptr);
kfree(ua);
}
}
kmem_cache_free(lkb_cache, lkb);
}
void dlm_free_lkb(struct dlm_lkb *lkb)
{
call_rcu(&lkb->rcu, __free_lkb_rcu);
}
struct dlm_mhandle *dlm_allocate_mhandle(void)
{
return kmem_cache_alloc(mhandle_cache, GFP_ATOMIC);
}
void dlm_free_mhandle(struct dlm_mhandle *mhandle)
{
kmem_cache_free(mhandle_cache, mhandle);
}
struct writequeue_entry *dlm_allocate_writequeue(void)
{
return kmem_cache_alloc(writequeue_cache, GFP_ATOMIC);
}
void dlm_free_writequeue(struct writequeue_entry *writequeue)
{
kmem_cache_free(writequeue_cache, writequeue);
}
struct dlm_msg *dlm_allocate_msg(void)
{
return kmem_cache_alloc(msg_cache, GFP_ATOMIC);
}
void dlm_free_msg(struct dlm_msg *msg)
{
kmem_cache_free(msg_cache, msg);
}
struct dlm_callback *dlm_allocate_cb(void)
{
return kmem_cache_alloc(cb_cache, GFP_ATOMIC);
}
void dlm_free_cb(struct dlm_callback *cb)
{
kmem_cache_free(cb_cache, cb);
}
Annotation
- Immediate include surface: `dlm_internal.h`, `midcomms.h`, `lowcomms.h`, `config.h`, `memory.h`, `ast.h`.
- Detected declarations: `function dlm_memory_init`, `function dlm_memory_exit`, `function dlm_free_lvb`, `function __free_rsb_rcu`, `function dlm_free_rsb`, `function __free_lkb_rcu`, `function dlm_free_lkb`, `function dlm_free_mhandle`, `function dlm_free_writequeue`, `function dlm_free_msg`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.