Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
c36dcfe1
cloud-kernel
项目概览
openanolis
/
cloud-kernel
接近 2 年 前同步成功
通知
169
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看板
提交
c36dcfe1
编写于
8月 26, 2013
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SUNRPC: Remove the rpc_client->cl_dentry
It is now redundant. Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
2127d82a
变更
4
隐藏空白更改
内联
并排
Showing
4 changed file
with
26 addition
and
25 deletion
+26
-25
include/linux/sunrpc/clnt.h
include/linux/sunrpc/clnt.h
+0
-1
include/linux/sunrpc/rpc_pipe_fs.h
include/linux/sunrpc/rpc_pipe_fs.h
+1
-1
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+18
-17
net/sunrpc/rpc_pipe.c
net/sunrpc/rpc_pipe.c
+7
-6
未找到文件。
include/linux/sunrpc/clnt.h
浏览文件 @
c36dcfe1
...
...
@@ -57,7 +57,6 @@ struct rpc_clnt {
int
cl_nodelen
;
/* nodename length */
char
cl_nodename
[
UNX_MAXNODENAME
];
struct
rpc_pipe_dir_head
cl_pipedir_objects
;
struct
dentry
*
cl_dentry
;
struct
rpc_clnt
*
cl_parent
;
/* Points to parent of clones */
struct
rpc_rtt
cl_rtt_default
;
struct
rpc_timeout
cl_timeout_default
;
...
...
include/linux/sunrpc/rpc_pipe_fs.h
浏览文件 @
c36dcfe1
...
...
@@ -94,7 +94,7 @@ extern int rpc_queue_upcall(struct rpc_pipe *, struct rpc_pipe_msg *);
struct
rpc_clnt
;
extern
struct
dentry
*
rpc_create_client_dir
(
struct
dentry
*
,
const
char
*
,
struct
rpc_clnt
*
);
extern
int
rpc_remove_client_dir
(
struct
dentry
*
,
struct
rpc_clnt
*
);
extern
int
rpc_remove_client_dir
(
struct
rpc_clnt
*
);
extern
void
rpc_init_pipe_dir_head
(
struct
rpc_pipe_dir_head
*
pdh
);
extern
void
rpc_init_pipe_dir_object
(
struct
rpc_pipe_dir_object
*
pdo
,
...
...
net/sunrpc/clnt.c
浏览文件 @
c36dcfe1
...
...
@@ -102,9 +102,7 @@ static void rpc_unregister_client(struct rpc_clnt *clnt)
static
void
__rpc_clnt_remove_pipedir
(
struct
rpc_clnt
*
clnt
)
{
if
(
clnt
->
cl_dentry
)
rpc_remove_client_dir
(
clnt
->
cl_dentry
,
clnt
);
clnt
->
cl_dentry
=
NULL
;
rpc_remove_client_dir
(
clnt
);
}
static
void
rpc_clnt_remove_pipedir
(
struct
rpc_clnt
*
clnt
)
...
...
@@ -154,14 +152,11 @@ rpc_setup_pipedir(struct super_block *pipefs_sb, struct rpc_clnt *clnt)
{
struct
dentry
*
dentry
;
if
(
clnt
->
cl_program
->
pipe_dir_name
==
NULL
)
goto
out
;
clnt
->
cl_dentry
=
NULL
;
dentry
=
rpc_setup_pipedir_sb
(
pipefs_sb
,
clnt
);
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
clnt
->
cl_dentry
=
dentry
;
out:
if
(
clnt
->
cl_program
->
pipe_dir_name
!=
NULL
)
{
dentry
=
rpc_setup_pipedir_sb
(
pipefs_sb
,
clnt
);
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
}
return
0
;
}
...
...
@@ -170,11 +165,18 @@ static int rpc_clnt_skip_event(struct rpc_clnt *clnt, unsigned long event)
if
(
clnt
->
cl_program
->
pipe_dir_name
==
NULL
)
return
1
;
if
(((
event
==
RPC_PIPEFS_MOUNT
)
&&
clnt
->
cl_dentry
)
||
((
event
==
RPC_PIPEFS_UMOUNT
)
&&
!
clnt
->
cl_dentry
))
return
1
;
if
((
event
==
RPC_PIPEFS_MOUNT
)
&&
atomic_read
(
&
clnt
->
cl_count
)
==
0
)
return
1
;
switch
(
event
)
{
case
RPC_PIPEFS_MOUNT
:
if
(
clnt
->
cl_pipedir_objects
.
pdh_dentry
!=
NULL
)
return
1
;
if
(
atomic_read
(
&
clnt
->
cl_count
)
==
0
)
return
1
;
break
;
case
RPC_PIPEFS_UMOUNT
:
if
(
clnt
->
cl_pipedir_objects
.
pdh_dentry
==
NULL
)
return
1
;
break
;
}
return
0
;
}
...
...
@@ -191,7 +193,6 @@ static int __rpc_clnt_handle_event(struct rpc_clnt *clnt, unsigned long event,
return
-
ENOENT
;
if
(
IS_ERR
(
dentry
))
return
PTR_ERR
(
dentry
);
clnt
->
cl_dentry
=
dentry
;
break
;
case
RPC_PIPEFS_UMOUNT
:
__rpc_clnt_remove_pipedir
(
clnt
);
...
...
net/sunrpc/rpc_pipe.c
浏览文件 @
c36dcfe1
...
...
@@ -1055,15 +1055,16 @@ struct dentry *rpc_create_client_dir(struct dentry *dentry,
/**
* rpc_remove_client_dir - Remove a directory created with rpc_create_client_dir()
* @dentry: dentry for the pipe
* @rpc_client: rpc_client for the pipe
*/
int
rpc_remove_client_dir
(
struct
dentry
*
dentry
,
struct
rpc_clnt
*
rpc_client
)
int
rpc_remove_client_dir
(
struct
rpc_clnt
*
rpc_client
)
{
if
(
rpc_client
->
cl_pipedir_objects
.
pdh_dentry
)
{
rpc_destroy_pipe_dir_objects
(
&
rpc_client
->
cl_pipedir_objects
);
rpc_client
->
cl_pipedir_objects
.
pdh_dentry
=
NULL
;
}
struct
dentry
*
dentry
=
rpc_client
->
cl_pipedir_objects
.
pdh_dentry
;
if
(
dentry
==
NULL
)
return
0
;
rpc_destroy_pipe_dir_objects
(
&
rpc_client
->
cl_pipedir_objects
);
rpc_client
->
cl_pipedir_objects
.
pdh_dentry
=
NULL
;
return
rpc_rmdir_depopulate
(
dentry
,
rpc_clntdir_depopulate
);
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录