Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
821cc307
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看板
提交
821cc307
编写于
9月 25, 2014
作者:
A
Al Viro
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
ncpfs: use list_for_each_entry() for d_subdirs walk
Signed-off-by:
N
Al Viro
<
viro@zeniv.linux.org.uk
>
上级
5e6123f3
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
3 addition
and
17 deletion
+3
-17
fs/ncpfs/dir.c
fs/ncpfs/dir.c
+1
-5
fs/ncpfs/ncplib_kernel.h
fs/ncpfs/ncplib_kernel.h
+2
-12
未找到文件。
fs/ncpfs/dir.c
浏览文件 @
821cc307
...
...
@@ -388,7 +388,6 @@ static struct dentry *
ncp_dget_fpos
(
struct
dentry
*
dentry
,
struct
dentry
*
parent
,
unsigned
long
fpos
)
{
struct
dentry
*
dent
=
dentry
;
struct
list_head
*
next
;
if
(
d_validate
(
dent
,
parent
))
{
if
(
dent
->
d_name
.
len
<=
NCP_MAXPATHLEN
&&
...
...
@@ -404,9 +403,7 @@ ncp_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
/* If a pointer is invalid, we search the dentry. */
spin_lock
(
&
parent
->
d_lock
);
next
=
parent
->
d_subdirs
.
next
;
while
(
next
!=
&
parent
->
d_subdirs
)
{
dent
=
list_entry
(
next
,
struct
dentry
,
d_u
.
d_child
);
list_for_each_entry
(
dent
,
&
parent
->
d_subdirs
,
d_u
.
d_child
)
{
if
((
unsigned
long
)
dent
->
d_fsdata
==
fpos
)
{
if
(
dent
->
d_inode
)
dget
(
dent
);
...
...
@@ -415,7 +412,6 @@ ncp_dget_fpos(struct dentry *dentry, struct dentry *parent, unsigned long fpos)
spin_unlock
(
&
parent
->
d_lock
);
goto
out
;
}
next
=
next
->
next
;
}
spin_unlock
(
&
parent
->
d_lock
);
return
NULL
;
...
...
fs/ncpfs/ncplib_kernel.h
浏览文件 @
821cc307
...
...
@@ -188,20 +188,14 @@ static inline void
ncp_renew_dentries
(
struct
dentry
*
parent
)
{
struct
ncp_server
*
server
=
NCP_SERVER
(
parent
->
d_inode
);
struct
list_head
*
next
;
struct
dentry
*
dentry
;
spin_lock
(
&
parent
->
d_lock
);
next
=
parent
->
d_subdirs
.
next
;
while
(
next
!=
&
parent
->
d_subdirs
)
{
dentry
=
list_entry
(
next
,
struct
dentry
,
d_u
.
d_child
);
list_for_each_entry
(
dentry
,
&
parent
->
d_subdirs
,
d_u
.
d_child
)
{
if
(
dentry
->
d_fsdata
==
NULL
)
ncp_age_dentry
(
server
,
dentry
);
else
ncp_new_dentry
(
dentry
);
next
=
next
->
next
;
}
spin_unlock
(
&
parent
->
d_lock
);
}
...
...
@@ -210,16 +204,12 @@ static inline void
ncp_invalidate_dircache_entries
(
struct
dentry
*
parent
)
{
struct
ncp_server
*
server
=
NCP_SERVER
(
parent
->
d_inode
);
struct
list_head
*
next
;
struct
dentry
*
dentry
;
spin_lock
(
&
parent
->
d_lock
);
next
=
parent
->
d_subdirs
.
next
;
while
(
next
!=
&
parent
->
d_subdirs
)
{
dentry
=
list_entry
(
next
,
struct
dentry
,
d_u
.
d_child
);
list_for_each_entry
(
dentry
,
&
parent
->
d_subdirs
,
d_u
.
d_child
)
{
dentry
->
d_fsdata
=
NULL
;
ncp_age_dentry
(
server
,
dentry
);
next
=
next
->
next
;
}
spin_unlock
(
&
parent
->
d_lock
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录