Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
11f17c9b
R
raspberrypi-kernel
项目概览
openeuler
/
raspberrypi-kernel
通知
14
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看板
提交
11f17c9b
编写于
5月 14, 2018
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
cifs_lookup(): switch to d_splice_alias()
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
a8b75f66
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
18 addition
and
18 deletion
+18
-18
fs/cifs/dir.c
fs/cifs/dir.c
+18
-18
未找到文件。
fs/cifs/dir.c
浏览文件 @
11f17c9b
...
@@ -779,21 +779,25 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
...
@@ -779,21 +779,25 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
tlink
=
cifs_sb_tlink
(
cifs_sb
);
tlink
=
cifs_sb_tlink
(
cifs_sb
);
if
(
IS_ERR
(
tlink
))
{
if
(
IS_ERR
(
tlink
))
{
free_xid
(
xid
);
free_xid
(
xid
);
return
(
struct
dentry
*
)
tlink
;
return
ERR_CAST
(
tlink
)
;
}
}
pTcon
=
tlink_tcon
(
tlink
);
pTcon
=
tlink_tcon
(
tlink
);
rc
=
check_name
(
direntry
,
pTcon
);
rc
=
check_name
(
direntry
,
pTcon
);
if
(
rc
)
if
(
unlikely
(
rc
))
{
goto
lookup_out
;
cifs_put_tlink
(
tlink
);
free_xid
(
xid
);
return
ERR_PTR
(
rc
);
}
/* can not grab the rename sem here since it would
/* can not grab the rename sem here since it would
deadlock in the cases (beginning of sys_rename itself)
deadlock in the cases (beginning of sys_rename itself)
in which we already have the sb rename sem */
in which we already have the sb rename sem */
full_path
=
build_path_from_dentry
(
direntry
);
full_path
=
build_path_from_dentry
(
direntry
);
if
(
full_path
==
NULL
)
{
if
(
full_path
==
NULL
)
{
rc
=
-
ENOMEM
;
cifs_put_tlink
(
tlink
);
goto
lookup_out
;
free_xid
(
xid
);
return
ERR_PTR
(
-
ENOMEM
);
}
}
if
(
d_really_is_positive
(
direntry
))
{
if
(
d_really_is_positive
(
direntry
))
{
...
@@ -813,28 +817,24 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
...
@@ -813,28 +817,24 @@ cifs_lookup(struct inode *parent_dir_inode, struct dentry *direntry,
}
}
if
(
rc
==
0
)
{
if
(
rc
==
0
)
{
d_add
(
direntry
,
newInode
);
/* since paths are not looked up by component - the parent
/* since paths are not looked up by component - the parent
directories are presumed to be good here */
directories are presumed to be good here */
renew_parental_timestamps
(
direntry
);
renew_parental_timestamps
(
direntry
);
}
else
if
(
rc
==
-
ENOENT
)
{
}
else
if
(
rc
==
-
ENOENT
)
{
rc
=
0
;
cifs_set_time
(
direntry
,
jiffies
);
cifs_set_time
(
direntry
,
jiffies
);
d_add
(
direntry
,
NULL
);
newInode
=
NULL
;
/* if it was once a directory (but how can we tell?) we could do
}
else
{
shrink_dcache_parent(direntry); */
if
(
rc
!=
-
EACCES
)
{
}
else
if
(
rc
!=
-
EACCES
)
{
cifs_dbg
(
FYI
,
"Unexpected lookup error %d
\n
"
,
rc
);
cifs_dbg
(
FYI
,
"Unexpected lookup error %d
\n
"
,
rc
);
/* We special case check for Access Denied - since that
/* We special case check for Access Denied - since that
is a common return code */
is a common return code */
}
newInode
=
ERR_PTR
(
rc
);
}
}
lookup_out:
kfree
(
full_path
);
kfree
(
full_path
);
cifs_put_tlink
(
tlink
);
cifs_put_tlink
(
tlink
);
free_xid
(
xid
);
free_xid
(
xid
);
return
ERR_PTR
(
rc
);
return
d_splice_alias
(
newInode
,
direntry
);
}
}
static
int
static
int
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录