Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

Source Code:fs\fhandle.c Create Date:2022-07-28 20:31:17
Last Modify:2020-03-12 14:18:49 Copyright©Brick
home page Tree
Annotation kernel can get tool activityDownload SCCTChinese

Name:handle_to_path

Proto:static int handle_to_path(int mountdirfd, struct file_handle __user *ufh, struct path *path)

Type:int

Parameter:

TypeParameterName
intmountdirfd
struct file_handle __user *ufh
struct path *path
170  retval = 0
172  struct file_handle * handle = NULL
179  If Not Check operation authority Then
180  retval = -EPERM
181  Go to out_err
183  If copy_from_user( & f_handle, ufh, sizeof(structfile_handle)) Then
184  retval = -EFAULT
185  Go to out_err
187  If handle_bytes > limit the handle size to NFSv4 handle size now || handle_bytes == 0 Then
189  retval = -EINVAL
190  Go to out_err
192  handle = Allocation memory
194  If Not handle Then
195  retval = -ENOMEM
196  Go to out_err
199  handle = f_handle
200  If copy_from_user( & file identifier , & file identifier , handle_bytes) Then
203  retval = -EFAULT
204  Go to out_handle
207  retval = do_handle_to_path(mountdirfd, handle, path)
209  out_handle :
210  kfree(handle)
211  out_err :
212  Return retval
Caller
NameDescribe
do_handle_open