Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openeuler
raspberrypi-kernel
提交
27adaddc
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看板
提交
27adaddc
编写于
7月 25, 2012
作者:
S
Stanislav Kinsbursky
提交者:
J. Bruce Fields
7月 27, 2012
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
LockD: make garbage collector network namespace aware.
Signed-off-by:
N
J. Bruce Fields
<
bfields@redhat.com
>
上级
b26411f8
变更
1
隐藏空白更改
内联
并排
Showing
1 changed file
with
13 addition
and
9 deletion
+13
-9
fs/lockd/host.c
fs/lockd/host.c
+13
-9
未找到文件。
fs/lockd/host.c
浏览文件 @
27adaddc
...
...
@@ -45,7 +45,7 @@ static unsigned long next_gc;
static
unsigned
long
nrhosts
;
static
DEFINE_MUTEX
(
nlm_host_mutex
);
static
void
nlm_gc_hosts
(
void
);
static
void
nlm_gc_hosts
(
struct
net
*
net
);
struct
nlm_lookup_host_info
{
const
int
server
;
/* search for server|client */
...
...
@@ -345,7 +345,7 @@ struct nlm_host *nlmsvc_lookup_host(const struct svc_rqst *rqstp,
mutex_lock
(
&
nlm_host_mutex
);
if
(
time_after_eq
(
jiffies
,
next_gc
))
nlm_gc_hosts
();
nlm_gc_hosts
(
net
);
chain
=
&
nlm_server_hosts
[
nlm_hash_address
(
ni
.
sap
)];
hlist_for_each_entry
(
host
,
pos
,
chain
,
h_hash
)
{
...
...
@@ -588,7 +588,7 @@ nlm_shutdown_hosts_net(struct net *net)
}
/* Then, perform a garbage collection pass */
nlm_gc_hosts
();
nlm_gc_hosts
(
net
);
mutex_unlock
(
&
nlm_host_mutex
);
}
...
...
@@ -623,27 +623,31 @@ nlm_shutdown_hosts(void)
* mark & sweep for resources held by remote clients.
*/
static
void
nlm_gc_hosts
(
void
)
nlm_gc_hosts
(
struct
net
*
net
)
{
struct
hlist_head
*
chain
;
struct
hlist_node
*
pos
,
*
next
;
struct
nlm_host
*
host
;
struct
net
*
net
=
&
init_net
;
dprintk
(
"lockd: host garbage collection
\n
"
);
for_each_host
(
host
,
pos
,
chain
,
nlm_server_hosts
)
dprintk
(
"lockd: host garbage collection for net %p
\n
"
,
net
);
for_each_host
(
host
,
pos
,
chain
,
nlm_server_hosts
)
{
if
(
net
&&
host
->
net
!=
net
)
continue
;
host
->
h_inuse
=
0
;
}
/* Mark all hosts that hold locks, blocks or shares */
nlmsvc_mark_resources
(
net
);
for_each_host_safe
(
host
,
pos
,
next
,
chain
,
nlm_server_hosts
)
{
if
(
net
&&
host
->
net
!=
net
)
continue
;
if
(
atomic_read
(
&
host
->
h_count
)
||
host
->
h_inuse
||
time_before
(
jiffies
,
host
->
h_expires
))
{
dprintk
(
"nlm_gc_hosts skipping %s "
"(cnt %d use %d exp %ld)
\n
"
,
"(cnt %d use %d exp %ld
net %p
)
\n
"
,
host
->
h_name
,
atomic_read
(
&
host
->
h_count
),
host
->
h_inuse
,
host
->
h_expires
);
host
->
h_inuse
,
host
->
h_expires
,
host
->
net
);
continue
;
}
nlm_destroy_host_locked
(
host
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录