fs/squashfs/decompressor.c
Source file repositories/reference/linux-study-clean/fs/squashfs/decompressor.c
File Facts
- System
- Linux kernel
- Corpus path
fs/squashfs/decompressor.c- Extension
.c- Size
- 3298 bytes
- Lines
- 142
- 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
linux/types.hlinux/mutex.hlinux/slab.hsquashfs_fs.hsquashfs_fs_sb.hdecompressor.hsquashfs.hpage_actor.h
Detected Declarations
- No top-level syscall, struct, function, initcall, or export declaration detected by the generator.
Annotated Snippet
if (buffer == NULL) {
comp_opts = ERR_PTR(-ENOMEM);
goto out;
}
actor = squashfs_page_actor_init(&buffer, 1, 0);
if (actor == NULL) {
comp_opts = ERR_PTR(-ENOMEM);
goto out;
}
length = squashfs_read_data(sb,
sizeof(struct squashfs_super_block), 0, NULL, actor);
if (length < 0) {
comp_opts = ERR_PTR(length);
goto out;
}
}
comp_opts = squashfs_comp_opts(msblk, buffer, length);
out:
kfree(actor);
kfree(buffer);
return comp_opts;
}
void *squashfs_decompressor_setup(struct super_block *sb, unsigned short flags)
{
struct squashfs_sb_info *msblk = sb->s_fs_info;
void *stream, *comp_opts = get_comp_opts(sb, flags);
if (IS_ERR(comp_opts))
return comp_opts;
stream = msblk->thread_ops->create(msblk, comp_opts);
if (IS_ERR(stream))
kfree(comp_opts);
return stream;
}
Annotation
- Immediate include surface: `linux/types.h`, `linux/mutex.h`, `linux/slab.h`, `squashfs_fs.h`, `squashfs_fs_sb.h`, `decompressor.h`, `squashfs.h`, `page_actor.h`.
- 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.