Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c4d30967
cloud-kernel
项目概览
openanolis
/
cloud-kernel
大约 1 年 前同步成功
通知
158
Star
36
Fork
7
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
10
列表
看板
标记
里程碑
合并请求
2
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
cloud-kernel
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
10
Issue
10
列表
看板
标记
里程碑
合并请求
2
合并请求
2
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
c4d30967
编写于
2月 27, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
9p: turn fid->dlist into hlist
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
634095da
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
9 addition
and
11 deletion
+9
-11
fs/9p/fid.c
fs/9p/fid.c
+4
-3
fs/9p/fid.h
fs/9p/fid.h
+1
-1
fs/9p/vfs_dentry.c
fs/9p/vfs_dentry.c
+3
-6
include/net/9p/client.h
include/net/9p/client.h
+1
-1
未找到文件。
fs/9p/fid.c
浏览文件 @
c4d30967
...
...
@@ -54,12 +54,12 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
if
(
!
dent
)
return
-
ENOMEM
;
INIT_LIST_HEAD
(
&
dent
->
fidlist
);
INIT_
H
LIST_HEAD
(
&
dent
->
fidlist
);
dentry
->
d_fsdata
=
dent
;
}
spin_lock
(
&
dentry
->
d_lock
);
list_ad
d
(
&
fid
->
dlist
,
&
dent
->
fidlist
);
hlist_add_hea
d
(
&
fid
->
dlist
,
&
dent
->
fidlist
);
spin_unlock
(
&
dentry
->
d_lock
);
return
0
;
...
...
@@ -84,8 +84,9 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
dent
=
(
struct
v9fs_dentry
*
)
dentry
->
d_fsdata
;
ret
=
NULL
;
if
(
dent
)
{
struct
hlist_node
*
n
;
spin_lock
(
&
dentry
->
d_lock
);
list_for_each_entry
(
fid
,
&
dent
->
fidlist
,
dlist
)
{
hlist_for_each_entry
(
fid
,
n
,
&
dent
->
fidlist
,
dlist
)
{
if
(
any
||
uid_eq
(
fid
->
uid
,
uid
))
{
ret
=
fid
;
break
;
...
...
fs/9p/fid.h
浏览文件 @
c4d30967
...
...
@@ -40,7 +40,7 @@
* Design and Implementation of the Linux 9P File System documentation
*/
struct
v9fs_dentry
{
struct
list_head
fidlist
;
struct
h
list_head
fidlist
;
};
struct
p9_fid
*
v9fs_fid_lookup
(
struct
dentry
*
dentry
);
...
...
fs/9p/vfs_dentry.c
浏览文件 @
c4d30967
...
...
@@ -84,16 +84,13 @@ static int v9fs_cached_dentry_delete(const struct dentry *dentry)
static
void
v9fs_dentry_release
(
struct
dentry
*
dentry
)
{
struct
v9fs_dentry
*
dent
;
struct
p9_fid
*
temp
,
*
current_fid
;
p9_debug
(
P9_DEBUG_VFS
,
" dentry: %s (%p)
\n
"
,
dentry
->
d_name
.
name
,
dentry
);
dent
=
dentry
->
d_fsdata
;
if
(
dent
)
{
list_for_each_entry_safe
(
current_fid
,
temp
,
&
dent
->
fidlist
,
dlist
)
{
p9_client_clunk
(
current_fid
);
}
struct
hlist_node
*
p
,
*
n
;
hlist_for_each_safe
(
p
,
n
,
&
dent
->
fidlist
)
p9_client_clunk
(
hlist_entry
(
p
,
struct
p9_fid
,
dlist
));
kfree
(
dent
);
dentry
->
d_fsdata
=
NULL
;
...
...
include/net/9p/client.h
浏览文件 @
c4d30967
...
...
@@ -192,7 +192,7 @@ struct p9_fid {
void
*
rdir
;
struct
list_head
flist
;
struct
list_head
dlist
;
/* list of all fids attached to a dentry */
struct
hlist_node
dlist
;
/* list of all fids attached to a dentry */
};
/**
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录