fs/lockd/clntlock.c
Source file repositories/reference/linux-study-clean/fs/lockd/clntlock.c
File Facts
- System
- Linux kernel
- Corpus path
fs/lockd/clntlock.c- Extension
.c- Size
- 7514 bytes
- Lines
- 298
- Domain
- Core OS
- Bucket
- VFS And Filesystem Core
- Inferred role
- Core OS: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- 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
linux/module.hlinux/types.hlinux/slab.hlinux/time.hlinux/nfs_fs.hlinux/sunrpc/addr.hlinux/sunrpc/svc.hlinux/sunrpc/svc_xprt.hlinux/kthread.hlockd.htrace.h
Detected Declarations
function nlmclnt_donefunction nlmclnt_prepare_blockfunction nlmclnt_queue_blockfunction nlmclnt_dequeue_blockfunction nlmclnt_waitfunction nlmclnt_grantfunction nlmclnt_recoveryfunction reclaimerexport nlmclnt_initexport nlmclnt_doneexport nlmclnt_rpc_clnt
Annotated Snippet
if (host->h_nsmstate != nsmstate) {
/* Argh! The server rebooted again! */
goto restart;
}
}
host->h_reclaiming = 0;
up_write(&host->h_rwsem);
dprintk("NLM: done reclaiming locks for host %s\n", host->h_name);
/* Now, wake up all processes that sleep on a blocked lock */
spin_lock(&nlm_blocked_lock);
list_for_each_entry(block, &nlm_blocked, b_list) {
if (block->b_host == host) {
block->b_status = nlm_lck_denied_grace_period;
wake_up(&block->b_wait);
}
}
spin_unlock(&nlm_blocked_lock);
/* Release host handle after use */
nlmclnt_release_host(host);
lockd_down(net);
kfree(req);
return 0;
}
Annotation
- Immediate include surface: `linux/module.h`, `linux/types.h`, `linux/slab.h`, `linux/time.h`, `linux/nfs_fs.h`, `linux/sunrpc/addr.h`, `linux/sunrpc/svc.h`, `linux/sunrpc/svc_xprt.h`.
- Detected declarations: `function nlmclnt_done`, `function nlmclnt_prepare_block`, `function nlmclnt_queue_block`, `function nlmclnt_dequeue_block`, `function nlmclnt_wait`, `function nlmclnt_grant`, `function nlmclnt_recovery`, `function reclaimer`, `export nlmclnt_init`, `export nlmclnt_done`.
- Atlas domain: Core OS / VFS And Filesystem Core.
- Implementation status: integration 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.