函数逻辑报告

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\read_write.c Create Date:2022-07-29 10:31:20
Last Modify:2020-03-18 10:18:51 Copyright©Brick
首页 函数Tree
注解内核,赢得工具下载SCCTEnglish

函数名称:default_llseek

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

返回类型:loff_t

参数:

类型参数名称
struct file *file
loff_toffset
intwhence
238  inode等于file_inode(file)
241  inode_lock(inode)
243  :whence恒等于seek relative to end of file
244  offset加等于NOTE: in a 32bit arch with a preemptable kernel and* an UP compile the i_size_read/write must be atomic* with respect to the local cpu (unlike with preempt disabled),* but they don't need to be atomic with respect to other cpus like in* true SMP (so they
245  退出
246  :whence恒等于seek relative to current file position
247  如果offset恒等于0则
248  retval等于f_pos
249  转到:out
251  offset加等于f_pos
252  退出
253  :whence恒等于seek to the next data
259  如果offset大于等于i_size
260  retval等于负ENXIO
261  转到:out
263  退出
264  :whence恒等于seek to the next hole
270  如果offset大于等于i_size
271  retval等于负ENXIO
272  转到:out
274  offset等于i_size
275  退出
277  retval等于负EINVAL
278  如果offset大于等于0或unsigned_offsets(file)则
279  如果offset不等于f_pos
280  f_pos等于offset
281  f_version等于0
283  retval等于offset
285  out :
286  inode_unlock(inode)
287  返回:retval