Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
10fa8e62
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看板
提交
10fa8e62
编写于
12月 26, 2009
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Unify exits in O_CREAT handling
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
9e67f361
变更
1
显示空白变更内容
内联
并排
Showing
1 changed file
with
13 addition
and
17 deletion
+13
-17
fs/namei.c
fs/namei.c
+13
-17
未找到文件。
fs/namei.c
浏览文件 @
10fa8e62
...
@@ -1821,9 +1821,8 @@ struct file *do_filp_open(int dfd, const char *pathname,
...
@@ -1821,9 +1821,8 @@ struct file *do_filp_open(int dfd, const char *pathname,
nd
.
flags
|=
LOOKUP_REVAL
;
nd
.
flags
|=
LOOKUP_REVAL
;
error
=
path_walk
(
pathname
,
&
nd
);
error
=
path_walk
(
pathname
,
&
nd
);
if
(
error
)
{
if
(
error
)
{
if
(
nd
.
root
.
mnt
)
filp
=
ERR_PTR
(
error
);
path_put
(
&
nd
.
root
);
goto
out
;
return
ERR_PTR
(
error
);
}
}
if
(
unlikely
(
!
audit_dummy_context
()))
if
(
unlikely
(
!
audit_dummy_context
()))
audit_inode
(
pathname
,
nd
.
path
.
dentry
);
audit_inode
(
pathname
,
nd
.
path
.
dentry
);
...
@@ -1847,9 +1846,7 @@ struct file *do_filp_open(int dfd, const char *pathname,
...
@@ -1847,9 +1846,7 @@ struct file *do_filp_open(int dfd, const char *pathname,
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
if
(
!
filp
)
if
(
!
filp
)
goto
do_link
;
goto
do_link
;
if
(
nd
.
root
.
mnt
)
goto
out
;
path_put
(
&
nd
.
root
);
return
filp
;
exit_dput:
exit_dput:
path_put_conditional
(
&
path
,
&
nd
);
path_put_conditional
(
&
path
,
&
nd
);
...
@@ -1857,9 +1854,15 @@ struct file *do_filp_open(int dfd, const char *pathname,
...
@@ -1857,9 +1854,15 @@ struct file *do_filp_open(int dfd, const char *pathname,
release_open_intent
(
&
nd
);
release_open_intent
(
&
nd
);
exit_parent:
exit_parent:
path_put
(
&
nd
.
path
);
path_put
(
&
nd
.
path
);
filp
=
ERR_PTR
(
error
);
out:
if
(
nd
.
root
.
mnt
)
if
(
nd
.
root
.
mnt
)
path_put
(
&
nd
.
root
);
path_put
(
&
nd
.
root
);
return
ERR_PTR
(
error
);
if
(
filp
==
ERR_PTR
(
-
ESTALE
)
&&
!
force_reval
)
{
force_reval
=
1
;
goto
reval
;
}
return
filp
;
do_link:
do_link:
error
=
-
ELOOP
;
error
=
-
ELOOP
;
...
@@ -1887,13 +1890,8 @@ struct file *do_filp_open(int dfd, const char *pathname,
...
@@ -1887,13 +1890,8 @@ struct file *do_filp_open(int dfd, const char *pathname,
* with "intent.open".
* with "intent.open".
*/
*/
release_open_intent
(
&
nd
);
release_open_intent
(
&
nd
);
if
(
nd
.
root
.
mnt
)
filp
=
ERR_PTR
(
error
);
path_put
(
&
nd
.
root
);
goto
out
;
if
(
error
==
-
ESTALE
&&
!
force_reval
)
{
force_reval
=
1
;
goto
reval
;
}
return
ERR_PTR
(
error
);
}
}
nd
.
flags
&=
~
LOOKUP_PARENT
;
nd
.
flags
&=
~
LOOKUP_PARENT
;
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
filp
=
do_last
(
&
nd
,
&
path
,
open_flag
,
acc_mode
,
mode
,
pathname
);
...
@@ -1901,9 +1899,7 @@ struct file *do_filp_open(int dfd, const char *pathname,
...
@@ -1901,9 +1899,7 @@ struct file *do_filp_open(int dfd, const char *pathname,
__putname
(
nd
.
last
.
name
);
__putname
(
nd
.
last
.
name
);
if
(
!
filp
)
if
(
!
filp
)
goto
do_link
;
goto
do_link
;
if
(
nd
.
root
.
mnt
)
goto
out
;
path_put
(
&
nd
.
root
);
return
filp
;
}
}
/**
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录