Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
50467914
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,发现更多精彩内容 >>
提交
50467914
编写于
6月 09, 2006
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
NLM: sem to mutex conversion
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
3134cbec
变更
2
隐藏空白更改
内联
并排
Showing
2 changed file
with
5 addition
and
5 deletion
+5
-5
fs/lockd/host.c
fs/lockd/host.c
+4
-4
include/linux/lockd/lockd.h
include/linux/lockd/lockd.h
+1
-1
未找到文件。
fs/lockd/host.c
浏览文件 @
50467914
...
@@ -112,7 +112,7 @@ nlm_lookup_host(int server, struct sockaddr_in *sin,
...
@@ -112,7 +112,7 @@ nlm_lookup_host(int server, struct sockaddr_in *sin,
host
->
h_version
=
version
;
host
->
h_version
=
version
;
host
->
h_proto
=
proto
;
host
->
h_proto
=
proto
;
host
->
h_rpcclnt
=
NULL
;
host
->
h_rpcclnt
=
NULL
;
init_MUTEX
(
&
host
->
h_sema
);
mutex_init
(
&
host
->
h_mutex
);
host
->
h_nextrebind
=
jiffies
+
NLM_HOST_REBIND
;
host
->
h_nextrebind
=
jiffies
+
NLM_HOST_REBIND
;
host
->
h_expires
=
jiffies
+
NLM_HOST_EXPIRE
;
host
->
h_expires
=
jiffies
+
NLM_HOST_EXPIRE
;
atomic_set
(
&
host
->
h_count
,
1
);
atomic_set
(
&
host
->
h_count
,
1
);
...
@@ -172,7 +172,7 @@ nlm_bind_host(struct nlm_host *host)
...
@@ -172,7 +172,7 @@ nlm_bind_host(struct nlm_host *host)
(
unsigned
)
ntohl
(
host
->
h_addr
.
sin_addr
.
s_addr
));
(
unsigned
)
ntohl
(
host
->
h_addr
.
sin_addr
.
s_addr
));
/* Lock host handle */
/* Lock host handle */
down
(
&
host
->
h_sema
);
mutex_lock
(
&
host
->
h_mutex
);
/* If we've already created an RPC client, check whether
/* If we've already created an RPC client, check whether
* RPC rebind is required
* RPC rebind is required
...
@@ -204,12 +204,12 @@ nlm_bind_host(struct nlm_host *host)
...
@@ -204,12 +204,12 @@ nlm_bind_host(struct nlm_host *host)
host
->
h_rpcclnt
=
clnt
;
host
->
h_rpcclnt
=
clnt
;
}
}
up
(
&
host
->
h_sema
);
mutex_unlock
(
&
host
->
h_mutex
);
return
clnt
;
return
clnt
;
forgetit:
forgetit:
printk
(
"lockd: couldn't create RPC handle for %s
\n
"
,
host
->
h_name
);
printk
(
"lockd: couldn't create RPC handle for %s
\n
"
,
host
->
h_name
);
up
(
&
host
->
h_sema
);
mutex_unlock
(
&
host
->
h_mutex
);
return
NULL
;
return
NULL
;
}
}
...
...
include/linux/lockd/lockd.h
浏览文件 @
50467914
...
@@ -54,7 +54,7 @@ struct nlm_host {
...
@@ -54,7 +54,7 @@ struct nlm_host {
u32
h_nsmstate
;
/* true remote NSM state */
u32
h_nsmstate
;
/* true remote NSM state */
u32
h_pidcount
;
/* Pseudopids */
u32
h_pidcount
;
/* Pseudopids */
atomic_t
h_count
;
/* reference count */
atomic_t
h_count
;
/* reference count */
struct
semaphore
h_sema
;
/* mutex for pmap binding */
struct
mutex
h_mutex
;
/* mutex for pmap binding */
unsigned
long
h_nextrebind
;
/* next portmap call */
unsigned
long
h_nextrebind
;
/* next portmap call */
unsigned
long
h_expires
;
/* eligible for GC */
unsigned
long
h_expires
;
/* eligible for GC */
struct
list_head
h_lockowners
;
/* Lockowners for the client */
struct
list_head
h_lockowners
;
/* Lockowners for the client */
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录