fs/hfs/sysdep.c
Source file repositories/reference/linux-study-clean/fs/hfs/sysdep.c
File Facts
- System
- Linux kernel
- Corpus path
fs/hfs/sysdep.c- Extension
.c- Size
- 1265 bytes
- Lines
- 51
- 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
linux/namei.hhfs_fs.h
Detected Declarations
function Copyright
Annotated Snippet
#include <linux/namei.h>
#include "hfs_fs.h"
/* dentry case-handling: just lowercase everything */
static int hfs_revalidate_dentry(struct inode *dir, const struct qstr *name,
struct dentry *dentry, unsigned int flags)
{
struct inode *inode;
int diff;
if (flags & LOOKUP_RCU)
return -ECHILD;
inode = d_inode(dentry);
if(!inode)
return 1;
/* fix up inode on a timezone change */
diff = sys_tz.tz_minuteswest * 60 - HFS_I(inode)->tz_secondswest;
if (diff) {
struct timespec64 ts = inode_get_ctime(inode);
inode_set_ctime(inode, ts.tv_sec + diff, ts.tv_nsec);
ts = inode_get_atime(inode);
inode_set_atime(inode, ts.tv_sec + diff, ts.tv_nsec);
ts = inode_get_mtime(inode);
inode_set_mtime(inode, ts.tv_sec + diff, ts.tv_nsec);
HFS_I(inode)->tz_secondswest += diff;
}
return 1;
}
const struct dentry_operations hfs_dentry_operations =
{
.d_revalidate = hfs_revalidate_dentry,
.d_hash = hfs_hash_dentry,
.d_compare = hfs_compare_dentry,
};
Annotation
- Immediate include surface: `linux/namei.h`, `hfs_fs.h`.
- Detected declarations: `function Copyright`.
- 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.