fs/ubifs/dir.c
Source file repositories/reference/linux-study-clean/fs/ubifs/dir.c
File Facts
- System
- Linux kernel
- Corpus path
fs/ubifs/dir.c- Extension
.c- Size
- 46622 bytes
- Lines
- 1773
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: operation-table or driver-model contract
- Status
- pattern 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 an operation table; this is where Linux turns generic core objects into subsystem-specific behavior.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- 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
ubifs.h
Detected Declarations
struct ubifs_dir_datafunction inherit_flagsfunction dbg_check_namefunction ubifs_prepare_createfunction ubifs_createfunction lock_2_inodesfunction unlock_2_inodesfunction ubifs_tmpfilefunction vfs_dent_typefunction ubifs_readdirfunction ubifs_dir_releasefunction ubifs_linkfunction ubifs_unlinkfunction ubifs_check_dir_emptyfunction ubifs_rmdirfunction ubifs_mknodfunction ubifs_symlinkfunction lock_4_inodesfunction unlock_4_inodesfunction do_renamefunction ubifs_xrenamefunction ubifs_renamefunction ubifs_getattrfunction ubifs_dir_openfunction ubifs_dir_llseek
Annotated Snippet
const struct file_operations ubifs_dir_operations = {
.open = ubifs_dir_open,
.llseek = ubifs_dir_llseek,
.release = ubifs_dir_release,
.read = generic_read_dir,
.iterate_shared = ubifs_readdir,
.fsync = ubifs_fsync,
.unlocked_ioctl = ubifs_ioctl,
#ifdef CONFIG_COMPAT
.compat_ioctl = ubifs_compat_ioctl,
#endif
};
Annotation
- Immediate include surface: `ubifs.h`.
- Detected declarations: `struct ubifs_dir_data`, `function inherit_flags`, `function dbg_check_name`, `function ubifs_prepare_create`, `function ubifs_create`, `function lock_2_inodes`, `function unlock_2_inodes`, `function ubifs_tmpfile`, `function vfs_dent_type`, `function ubifs_readdir`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: pattern implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.