fs/smb/server/mgmt/ksmbd_ida.c
Source file repositories/reference/linux-study-clean/fs/smb/server/mgmt/ksmbd_ida.c
File Facts
- System
- Linux kernel
- Corpus path
fs/smb/server/mgmt/ksmbd_ida.c- Extension
.c- Size
- 713 bytes
- Lines
- 39
- 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.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
ksmbd_ida.h../glob.h
Detected Declarations
function Copyrightfunction ksmbd_acquire_smb2_uidfunction ksmbd_acquire_async_msg_idfunction ksmbd_acquire_idfunction ksmbd_release_id
Annotated Snippet
// SPDX-License-Identifier: GPL-2.0-or-later
/*
* Copyright (C) 2018 Samsung Electronics Co., Ltd.
*/
#include "ksmbd_ida.h"
#include "../glob.h"
int ksmbd_acquire_smb2_tid(struct ida *ida)
{
return ida_alloc_range(ida, 1, 0xFFFFFFFE, KSMBD_DEFAULT_GFP);
}
int ksmbd_acquire_smb2_uid(struct ida *ida)
{
int id;
id = ida_alloc_min(ida, 1, KSMBD_DEFAULT_GFP);
if (id == 0xFFFE)
id = ida_alloc_min(ida, 1, KSMBD_DEFAULT_GFP);
return id;
}
int ksmbd_acquire_async_msg_id(struct ida *ida)
{
return ida_alloc_min(ida, 1, KSMBD_DEFAULT_GFP);
}
int ksmbd_acquire_id(struct ida *ida)
{
return ida_alloc(ida, KSMBD_DEFAULT_GFP);
}
void ksmbd_release_id(struct ida *ida, int id)
{
ida_free(ida, id);
}
Annotation
- Immediate include surface: `ksmbd_ida.h`, `../glob.h`.
- Detected declarations: `function Copyright`, `function ksmbd_acquire_smb2_uid`, `function ksmbd_acquire_async_msg_id`, `function ksmbd_acquire_id`, `function ksmbd_release_id`.
- 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.