Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
72bd866a
K
Kernel
项目概览
openeuler
/
Kernel
1 年多 前同步成功
通知
8
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
Kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
提交
72bd866a
编写于
6月 10, 2012
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
fs/namei.c: don't pass nameidata to __lookup_hash() and lookup_real()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
00cd8dd3
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
10 deletion
+10
-10
fs/namei.c
fs/namei.c
+10
-10
未找到文件。
fs/namei.c
浏览文件 @
72bd866a
...
...
@@ -1080,7 +1080,7 @@ static struct dentry *lookup_dcache(struct qstr *name, struct dentry *dir,
* dir->d_inode->i_mutex must be held
*/
static
struct
dentry
*
lookup_real
(
struct
inode
*
dir
,
struct
dentry
*
dentry
,
struct
nameidata
*
nd
)
unsigned
int
flags
)
{
struct
dentry
*
old
;
...
...
@@ -1090,7 +1090,7 @@ static struct dentry *lookup_real(struct inode *dir, struct dentry *dentry,
return
ERR_PTR
(
-
ENOENT
);
}
old
=
dir
->
i_op
->
lookup
(
dir
,
dentry
,
nd
?
nd
->
flags
:
0
);
old
=
dir
->
i_op
->
lookup
(
dir
,
dentry
,
flags
);
if
(
unlikely
(
old
))
{
dput
(
dentry
);
dentry
=
old
;
...
...
@@ -1099,16 +1099,16 @@ static struct dentry *lookup_real(struct inode *dir, struct dentry *dentry,
}
static
struct
dentry
*
__lookup_hash
(
struct
qstr
*
name
,
struct
dentry
*
base
,
struct
nameidata
*
nd
)
struct
dentry
*
base
,
unsigned
int
flags
)
{
bool
need_lookup
;
struct
dentry
*
dentry
;
dentry
=
lookup_dcache
(
name
,
base
,
nd
?
nd
->
flags
:
0
,
&
need_lookup
);
dentry
=
lookup_dcache
(
name
,
base
,
flags
,
&
need_lookup
);
if
(
!
need_lookup
)
return
dentry
;
return
lookup_real
(
base
->
d_inode
,
dentry
,
nd
);
return
lookup_real
(
base
->
d_inode
,
dentry
,
flags
);
}
/*
...
...
@@ -1227,7 +1227,7 @@ static int lookup_slow(struct nameidata *nd, struct qstr *name,
BUG_ON
(
nd
->
inode
!=
parent
->
d_inode
);
mutex_lock
(
&
parent
->
d_inode
->
i_mutex
);
dentry
=
__lookup_hash
(
name
,
parent
,
nd
);
dentry
=
__lookup_hash
(
name
,
parent
,
nd
->
flags
);
mutex_unlock
(
&
parent
->
d_inode
->
i_mutex
);
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
...
...
@@ -1859,7 +1859,7 @@ int vfs_path_lookup(struct dentry *dentry, struct vfsmount *mnt,
*/
static
struct
dentry
*
lookup_hash
(
struct
nameidata
*
nd
)
{
return
__lookup_hash
(
&
nd
->
last
,
nd
->
path
.
dentry
,
nd
);
return
__lookup_hash
(
&
nd
->
last
,
nd
->
path
.
dentry
,
nd
->
flags
);
}
/**
...
...
@@ -1906,7 +1906,7 @@ struct dentry *lookup_one_len(const char *name, struct dentry *base, int len)
if
(
err
)
return
ERR_PTR
(
err
);
return
__lookup_hash
(
&
this
,
base
,
NULL
);
return
__lookup_hash
(
&
this
,
base
,
0
);
}
int
user_path_at_empty
(
int
dfd
,
const
char
__user
*
name
,
unsigned
flags
,
...
...
@@ -2310,7 +2310,7 @@ static int atomic_open(struct nameidata *nd, struct dentry *dentry,
no_open:
if
(
need_lookup
)
{
dentry
=
lookup_real
(
dir
,
dentry
,
nd
);
dentry
=
lookup_real
(
dir
,
dentry
,
nd
->
flags
);
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
...
...
@@ -2372,7 +2372,7 @@ static int lookup_open(struct nameidata *nd, struct path *path,
if
(
need_lookup
)
{
BUG_ON
(
dentry
->
d_inode
);
dentry
=
lookup_real
(
dir_inode
,
dentry
,
nd
);
dentry
=
lookup_real
(
dir_inode
,
dentry
,
nd
->
flags
);
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录