Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
Kernel
提交
634095da
K
Kernel
项目概览
openeuler
/
Kernel
接近 2 年 前同步成功
通知
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看板
提交
634095da
编写于
2月 27, 2013
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
9p: don't bother with private lock in ->d_fsdata; dentry->d_lock will do just fine
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
6131ffaa
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
6 addition
and
7 deletion
+6
-7
fs/9p/fid.c
fs/9p/fid.c
+4
-5
fs/9p/fid.h
fs/9p/fid.h
+2
-2
未找到文件。
fs/9p/fid.c
浏览文件 @
634095da
...
@@ -54,14 +54,13 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
...
@@ -54,14 +54,13 @@ int v9fs_fid_add(struct dentry *dentry, struct p9_fid *fid)
if
(
!
dent
)
if
(
!
dent
)
return
-
ENOMEM
;
return
-
ENOMEM
;
spin_lock_init
(
&
dent
->
lock
);
INIT_LIST_HEAD
(
&
dent
->
fidlist
);
INIT_LIST_HEAD
(
&
dent
->
fidlist
);
dentry
->
d_fsdata
=
dent
;
dentry
->
d_fsdata
=
dent
;
}
}
spin_lock
(
&
dent
->
lock
);
spin_lock
(
&
dent
ry
->
d_
lock
);
list_add
(
&
fid
->
dlist
,
&
dent
->
fidlist
);
list_add
(
&
fid
->
dlist
,
&
dent
->
fidlist
);
spin_unlock
(
&
dent
->
lock
);
spin_unlock
(
&
dent
ry
->
d_
lock
);
return
0
;
return
0
;
}
}
...
@@ -85,14 +84,14 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
...
@@ -85,14 +84,14 @@ static struct p9_fid *v9fs_fid_find(struct dentry *dentry, kuid_t uid, int any)
dent
=
(
struct
v9fs_dentry
*
)
dentry
->
d_fsdata
;
dent
=
(
struct
v9fs_dentry
*
)
dentry
->
d_fsdata
;
ret
=
NULL
;
ret
=
NULL
;
if
(
dent
)
{
if
(
dent
)
{
spin_lock
(
&
dent
->
lock
);
spin_lock
(
&
dent
ry
->
d_
lock
);
list_for_each_entry
(
fid
,
&
dent
->
fidlist
,
dlist
)
{
list_for_each_entry
(
fid
,
&
dent
->
fidlist
,
dlist
)
{
if
(
any
||
uid_eq
(
fid
->
uid
,
uid
))
{
if
(
any
||
uid_eq
(
fid
->
uid
,
uid
))
{
ret
=
fid
;
ret
=
fid
;
break
;
break
;
}
}
}
}
spin_unlock
(
&
dent
->
lock
);
spin_unlock
(
&
dent
ry
->
d_
lock
);
}
}
return
ret
;
return
ret
;
...
...
fs/9p/fid.h
浏览文件 @
634095da
...
@@ -25,7 +25,6 @@
...
@@ -25,7 +25,6 @@
/**
/**
* struct v9fs_dentry - 9p private data stored in dentry d_fsdata
* struct v9fs_dentry - 9p private data stored in dentry d_fsdata
* @lock: protects the fidlist
* @fidlist: list of FIDs currently associated with this dentry
* @fidlist: list of FIDs currently associated with this dentry
*
*
* This structure defines the 9p private data associated with
* This structure defines the 9p private data associated with
...
@@ -35,11 +34,12 @@
...
@@ -35,11 +34,12 @@
* inodes in order to more closely map functionality to the Plan 9
* inodes in order to more closely map functionality to the Plan 9
* expected behavior for FID reclaimation and tracking.
* expected behavior for FID reclaimation and tracking.
*
*
* Protected by ->d_lock of dentry it belongs to.
*
* See Also: Mapping FIDs to Linux VFS model in
* See Also: Mapping FIDs to Linux VFS model in
* Design and Implementation of the Linux 9P File System documentation
* Design and Implementation of the Linux 9P File System documentation
*/
*/
struct
v9fs_dentry
{
struct
v9fs_dentry
{
spinlock_t
lock
;
/* protect fidlist */
struct
list_head
fidlist
;
struct
list_head
fidlist
;
};
};
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录