Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
e4bd1c1a
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
13
Star
1
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
R
raspberrypi-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
提交
e4bd1c1a
编写于
5月 12, 2015
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
namei: move putname() call into filename_lookup()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
625b6d10
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
15 addition
and
23 deletion
+15
-23
fs/namei.c
fs/namei.c
+15
-23
未找到文件。
fs/namei.c
浏览文件 @
e4bd1c1a
...
@@ -2134,6 +2134,7 @@ static int filename_lookup(int dfd, struct filename *name, unsigned flags,
...
@@ -2134,6 +2134,7 @@ static int filename_lookup(int dfd, struct filename *name, unsigned flags,
if
(
likely
(
!
retval
))
if
(
likely
(
!
retval
))
audit_inode
(
name
,
path
->
dentry
,
flags
&
LOOKUP_PARENT
);
audit_inode
(
name
,
path
->
dentry
,
flags
&
LOOKUP_PARENT
);
restore_nameidata
(
saved_nd
);
restore_nameidata
(
saved_nd
);
putname
(
name
);
return
retval
;
return
retval
;
}
}
...
@@ -2210,13 +2211,9 @@ int kern_path(const char *name, unsigned int flags, struct path *path)
...
@@ -2210,13 +2211,9 @@ int kern_path(const char *name, unsigned int flags, struct path *path)
{
{
struct
nameidata
nd
;
struct
nameidata
nd
;
struct
filename
*
filename
=
getname_kernel
(
name
);
struct
filename
*
filename
=
getname_kernel
(
name
);
int
res
=
PTR_ERR
(
filename
);
if
(
IS_ERR
(
filename
))
return
PTR_ERR
(
filename
);
if
(
!
IS_ERR
(
filename
))
{
return
filename_lookup
(
AT_FDCWD
,
filename
,
flags
,
&
nd
,
path
);
res
=
filename_lookup
(
AT_FDCWD
,
filename
,
flags
,
&
nd
,
path
);
putname
(
filename
);
}
return
res
;
}
}
EXPORT_SYMBOL
(
kern_path
);
EXPORT_SYMBOL
(
kern_path
);
...
@@ -2232,21 +2229,19 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
...
@@ -2232,21 +2229,19 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
const
char
*
name
,
unsigned
int
flags
,
const
char
*
name
,
unsigned
int
flags
,
struct
path
*
path
)
struct
path
*
path
)
{
{
struct
nameidata
nd
;
struct
filename
*
filename
=
getname_kernel
(
name
);
struct
filename
*
filename
=
getname_kernel
(
name
);
int
err
=
PTR_ERR
(
filename
);
BUG_ON
(
flags
&
LOOKUP_PARENT
);
BUG_ON
(
flags
&
LOOKUP_PARENT
);
/* the first argument of filename_lookup() is ignored with LOOKUP_ROOT */
if
(
IS_ERR
(
filename
))
if
(
!
IS_ERR
(
filename
))
{
return
PTR_ERR
(
filename
);
struct
nameidata
nd
;
nd
.
root
.
dentry
=
dentry
;
nd
.
root
.
dentry
=
dentry
;
nd
.
root
.
mnt
=
mnt
;
nd
.
root
.
mnt
=
mnt
;
err
=
filename_lookup
(
AT_FDCWD
,
filename
,
/* the first argument of filename_lookup() is ignored with LOOKUP_ROOT */
return
filename_lookup
(
AT_FDCWD
,
filename
,
flags
|
LOOKUP_ROOT
,
&
nd
,
path
);
flags
|
LOOKUP_ROOT
,
&
nd
,
path
);
putname
(
filename
);
}
return
err
;
}
}
EXPORT_SYMBOL
(
vfs_path_lookup
);
EXPORT_SYMBOL
(
vfs_path_lookup
);
...
@@ -2306,15 +2301,12 @@ int user_path_at_empty(int dfd, const char __user *name, unsigned flags,
...
@@ -2306,15 +2301,12 @@ int user_path_at_empty(int dfd, const char __user *name, unsigned flags,
{
{
struct
nameidata
nd
;
struct
nameidata
nd
;
struct
filename
*
tmp
=
getname_flags
(
name
,
flags
,
empty
);
struct
filename
*
tmp
=
getname_flags
(
name
,
flags
,
empty
);
i
nt
err
=
PTR_ERR
(
tmp
);
i
f
(
IS_ERR
(
tmp
))
if
(
!
IS_ERR
(
tmp
))
{
return
PTR_ERR
(
tmp
);
BUG_ON
(
flags
&
LOOKUP_PARENT
);
BUG_ON
(
flags
&
LOOKUP_PARENT
);
err
=
filename_lookup
(
dfd
,
tmp
,
flags
,
&
nd
,
path
);
return
filename_lookup
(
dfd
,
tmp
,
flags
,
&
nd
,
path
);
putname
(
tmp
);
}
return
err
;
}
}
int
user_path_at
(
int
dfd
,
const
char
__user
*
name
,
unsigned
flags
,
int
user_path_at
(
int
dfd
,
const
char
__user
*
name
,
unsigned
flags
,
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录