函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\libfs.c Create Date:2022-07-29 10:40:56
Last Modify:2020-03-12 14:18:49 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:dcache_dir_lseek

函数原型:loff_t dcache_dir_lseek(struct file *file, loff_t offset, int whence)

返回类型:loff_t

参数:

类型参数名称
struct file *file
loff_toffset
intwhence
135  dentry等于dentry
137  :whence恒等于1
138  offset加等于f_pos
140  :whence恒等于0
141  如果offset大于等于0则退出
144  默认
145  返回:负EINVAL
147  如果offset不等于f_pos
148  cursor等于 needed for tty driver, and maybe others
149  struct dentry * to = NULL
151  inode_lock_shared( Where the name belongs to - NULL is * negative )
153  如果offset大于2则to等于Returns an element of siblings' list.* We are looking for th positive after

; if* found, dentry is grabbed and returned to caller.* If no such element exists, NULL is returned.

156  加自旋锁
157  如果to链表项移动到头部
159  否则删除链表项并重新初始化
161  自旋锁解锁
162  dput - release a dentry*@dentry: dentry to release * Release a dentry. This will drop the usage count and if appropriate* call the dentry unlink method as well as removing it from the queues and* releasing its resources
164  f_pos等于offset
166  inode_unlock_shared( Where the name belongs to - NULL is * negative )
168  返回:offset