Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
63cf427a
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看板
提交
63cf427a
编写于
9月 26, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
kill __d_materialise_dentry()
it folds into __d_move() now Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
4453641f
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
10 addition
and
44 deletion
+10
-44
fs/dcache.c
fs/dcache.c
+10
-44
未找到文件。
fs/dcache.c
浏览文件 @
63cf427a
...
...
@@ -2511,28 +2511,28 @@ static void __d_move(struct dentry *dentry, struct dentry *target,
switch_names
(
dentry
,
target
);
swap
(
dentry
->
d_name
.
hash
,
target
->
d_name
.
hash
);
/* ... and switch the
parents
*/
/* ... and switch the
m in the tree
*/
if
(
IS_ROOT
(
dentry
))
{
/* splicing a tree */
dentry
->
d_parent
=
target
->
d_parent
;
target
->
d_parent
=
target
;
list_del_init
(
&
target
->
d_u
.
d_child
);
list_move
(
&
dentry
->
d_u
.
d_child
,
&
dentry
->
d_parent
->
d_subdirs
);
}
else
{
/* swapping two dentries */
swap
(
dentry
->
d_parent
,
target
->
d_parent
);
/* And add them back to the (new) parent lists */
list_move
(
&
target
->
d_u
.
d_child
,
&
target
->
d_parent
->
d_subdirs
);
list_move
(
&
dentry
->
d_u
.
d_child
,
&
dentry
->
d_parent
->
d_subdirs
);
if
(
exchange
)
fsnotify_d_move
(
target
);
fsnotify_d_move
(
dentry
);
}
list_move
(
&
dentry
->
d_u
.
d_child
,
&
dentry
->
d_parent
->
d_subdirs
);
write_seqcount_end
(
&
target
->
d_seq
);
write_seqcount_end
(
&
dentry
->
d_seq
);
dentry_unlock_parents_for_move
(
dentry
,
target
);
if
(
exchange
)
fsnotify_d_move
(
target
);
spin_unlock
(
&
target
->
d_lock
);
fsnotify_d_move
(
dentry
);
spin_unlock
(
&
dentry
->
d_lock
);
}
...
...
@@ -2631,40 +2631,6 @@ static struct dentry *__d_unalias(struct inode *inode,
return
ret
;
}
/*
* Prepare an anonymous dentry for life in the superblock's dentry tree as a
* named dentry in place of the dentry to be replaced.
*/
static
void
__d_materialise_dentry
(
struct
dentry
*
dentry
,
struct
dentry
*
target
)
{
dentry_lock_for_move
(
dentry
,
target
);
write_seqcount_begin
(
&
dentry
->
d_seq
);
write_seqcount_begin_nested
(
&
target
->
d_seq
,
DENTRY_D_LOCK_NESTED
);
switch_names
(
dentry
,
target
);
swap
(
dentry
->
d_name
.
hash
,
target
->
d_name
.
hash
);
dentry
->
d_parent
=
target
->
d_parent
;
target
->
d_parent
=
target
;
list_del_init
(
&
target
->
d_u
.
d_child
);
list_move
(
&
dentry
->
d_u
.
d_child
,
&
dentry
->
d_parent
->
d_subdirs
);
if
(
likely
(
!
d_unhashed
(
dentry
)))
{
hlist_bl_lock
(
&
dentry
->
d_sb
->
s_anon
);
__hlist_bl_del
(
&
dentry
->
d_hash
);
dentry
->
d_hash
.
pprev
=
NULL
;
hlist_bl_unlock
(
&
dentry
->
d_sb
->
s_anon
);
}
__d_rehash
(
dentry
,
d_hash
(
dentry
->
d_parent
,
dentry
->
d_name
.
hash
));
write_seqcount_end
(
&
target
->
d_seq
);
write_seqcount_end
(
&
dentry
->
d_seq
);
dentry_unlock_parents_for_move
(
dentry
,
target
);
spin_unlock
(
&
target
->
d_lock
);
spin_unlock
(
&
dentry
->
d_lock
);
}
/**
* d_splice_alias - splice a disconnected dentry into the tree if one exists
* @inode: the inode which may have a disconnected dentry
...
...
@@ -2710,7 +2676,7 @@ struct dentry *d_splice_alias(struct inode *inode, struct dentry *dentry)
return
ERR_PTR
(
-
EIO
);
}
write_seqlock
(
&
rename_lock
);
__d_m
aterialise_dentry
(
new
,
dentry
);
__d_m
ove
(
new
,
dentry
,
false
);
write_sequnlock
(
&
rename_lock
);
spin_unlock
(
&
inode
->
i_lock
);
security_d_instantiate
(
new
,
inode
);
...
...
@@ -2771,7 +2737,7 @@ struct dentry *d_materialise_unique(struct dentry *dentry, struct inode *inode)
}
else
if
(
IS_ROOT
(
alias
))
{
/* Is this an anonymous mountpoint that we
* could splice into our tree? */
__d_m
aterialise_dentry
(
alias
,
dentry
);
__d_m
ove
(
alias
,
dentry
,
false
);
write_sequnlock
(
&
rename_lock
);
goto
found
;
}
else
{
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录