Function report

Linux Kernel

v5.5.9

Brick Technologies Co., Ltd

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

Name:s_lookup_param - Look up a path referred to by a parameter*@fc: The filesystem context to log errors through.*@param: The parameter.*@want_bdev: T if want a blockdev*@_path: The result of the lookup

Proto:int fs_lookup_param(struct fs_context *fc, struct fs_parameter *param, bool want_bdev, struct path *_path)

Type:int

Parameter:

TypeParameterName
struct fs_context *fc
struct fs_parameter *param
boolwant_bdev
struct path *_path
259  flags = 0
264  Case The type of value here == Value is a string
265  f = getname_kernel(string)
266  If IS_ERR(f) Then Return PTR_ERR(f)
268  put_f = true
269  Break
270  Case The type of value here == Value is a filename* + dirfd + AT_EMPTY_PATH
271  flags = accept empty path [user_... only]
273  Case The type of value here == Value is a filename* + dirfd
274  f = name
275  put_f = false
276  Break
277  Default
278  Return valf - Store supplementary invalid argument error message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary error message for the process if the process has* enabled the facility and return -EINVAL.(fc, "%s: not usable as path", Parameter name )
281  refcnt++
282  ret = filename_lookup(dirfd, f, flags, _path, NULL)
283  If ret < 0 Then
284  rf - Store supplementary error message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary error message for the process if the process has* enabled the facility.(fc, "%s: Lookup failure for '%s'", Parameter name , pointer to actual string )
285  Go to out
288  If want_bdev && Not S_ISBLK(i_mode) Then
290  path_put - put a reference to a path*@path: path to put the reference to* Given a path decrement the reference count to the dentry and the vfsmount.
291  dentry = NULL
292  mnt = NULL
293  rf - Store supplementary error message*@fc: The context in which to log the error message*@fmt: The format string* Store the supplementary error message for the process if the process has* enabled the facility.(fc, "%s: Non-blockdev passed as '%s'", Parameter name , pointer to actual string )
295  ret = -ENOTBLK
298  out :
299  If put_f Then putname(f)
301  Return ret