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.

Dependency Surface

Detected Declarations

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

Implementation Notes