Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
openanolis
cloud-kernel
提交
a613fa16
cloud-kernel
项目概览
openanolis
/
cloud-kernel
1 年多 前同步成功
通知
160
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看板
提交
a613fa16
编写于
1月 20, 2012
作者:
T
Trond Myklebust
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
SUNRPC: constify the rpc_program
Signed-off-by:
N
Trond Myklebust
<
Trond.Myklebust@netapp.com
>
上级
080b794c
变更
17
隐藏空白更改
内联
并排
Showing
17 changed file
with
54 addition
and
54 deletion
+54
-54
fs/lockd/clnt4xdr.c
fs/lockd/clnt4xdr.c
+1
-1
fs/lockd/clntxdr.c
fs/lockd/clntxdr.c
+4
-4
fs/lockd/mon.c
fs/lockd/mon.c
+4
-4
fs/nfs/client.c
fs/nfs/client.c
+4
-4
fs/nfs/internal.h
fs/nfs/internal.h
+1
-1
fs/nfs/mount_clnt.c
fs/nfs/mount_clnt.c
+5
-5
fs/nfs/nfs2xdr.c
fs/nfs/nfs2xdr.c
+1
-1
fs/nfs/nfs3xdr.c
fs/nfs/nfs3xdr.c
+2
-2
fs/nfs/nfs4xdr.c
fs/nfs/nfs4xdr.c
+1
-1
fs/nfsd/nfs4callback.c
fs/nfsd/nfs4callback.c
+3
-3
include/linux/lockd/lockd.h
include/linux/lockd/lockd.h
+1
-1
include/linux/lockd/xdr4.h
include/linux/lockd/xdr4.h
+1
-1
include/linux/nfs_xdr.h
include/linux/nfs_xdr.h
+5
-5
include/linux/sunrpc/clnt.h
include/linux/sunrpc/clnt.h
+4
-4
include/linux/sunrpc/stats.h
include/linux/sunrpc/stats.h
+3
-3
net/sunrpc/clnt.c
net/sunrpc/clnt.c
+4
-4
net/sunrpc/rpcb_clnt.c
net/sunrpc/rpcb_clnt.c
+10
-10
未找到文件。
fs/lockd/clnt4xdr.c
浏览文件 @
a613fa16
...
...
@@ -598,7 +598,7 @@ static struct rpc_procinfo nlm4_procedures[] = {
PROC
(
GRANTED_RES
,
res
,
norep
),
};
struct
rpc_version
nlm_version4
=
{
const
struct
rpc_version
nlm_version4
=
{
.
number
=
4
,
.
nrprocs
=
ARRAY_SIZE
(
nlm4_procedures
),
.
procs
=
nlm4_procedures
,
...
...
fs/lockd/clntxdr.c
浏览文件 @
a613fa16
...
...
@@ -596,19 +596,19 @@ static struct rpc_procinfo nlm_procedures[] = {
PROC
(
GRANTED_RES
,
res
,
norep
),
};
static
struct
rpc_version
nlm_version1
=
{
static
const
struct
rpc_version
nlm_version1
=
{
.
number
=
1
,
.
nrprocs
=
ARRAY_SIZE
(
nlm_procedures
),
.
procs
=
nlm_procedures
,
};
static
struct
rpc_version
nlm_version3
=
{
static
const
struct
rpc_version
nlm_version3
=
{
.
number
=
3
,
.
nrprocs
=
ARRAY_SIZE
(
nlm_procedures
),
.
procs
=
nlm_procedures
,
};
static
struct
rpc_version
*
nlm_versions
[]
=
{
static
const
struct
rpc_version
*
nlm_versions
[]
=
{
[
1
]
=
&
nlm_version1
,
[
3
]
=
&
nlm_version3
,
#ifdef CONFIG_LOCKD_V4
...
...
@@ -618,7 +618,7 @@ static struct rpc_version *nlm_versions[] = {
static
struct
rpc_stat
nlm_rpc_stats
;
struct
rpc_program
nlm_program
=
{
const
struct
rpc_program
nlm_program
=
{
.
name
=
"lockd"
,
.
number
=
NLM_PROGRAM
,
.
nrvers
=
ARRAY_SIZE
(
nlm_versions
),
...
...
fs/lockd/mon.c
浏览文件 @
a613fa16
...
...
@@ -47,7 +47,7 @@ struct nsm_res {
u32
state
;
};
static
struct
rpc_program
nsm_program
;
static
const
struct
rpc_program
nsm_program
;
static
LIST_HEAD
(
nsm_handles
);
static
DEFINE_SPINLOCK
(
nsm_lock
);
...
...
@@ -534,19 +534,19 @@ static struct rpc_procinfo nsm_procedures[] = {
},
};
static
struct
rpc_version
nsm_version1
=
{
static
const
struct
rpc_version
nsm_version1
=
{
.
number
=
1
,
.
nrprocs
=
ARRAY_SIZE
(
nsm_procedures
),
.
procs
=
nsm_procedures
};
static
struct
rpc_version
*
nsm_version
[]
=
{
static
const
struct
rpc_version
*
nsm_version
[]
=
{
[
1
]
=
&
nsm_version1
,
};
static
struct
rpc_stat
nsm_stats
;
static
struct
rpc_program
nsm_program
=
{
static
const
struct
rpc_program
nsm_program
=
{
.
name
=
"statd"
,
.
number
=
NSM_PROGRAM
,
.
nrvers
=
ARRAY_SIZE
(
nsm_version
),
...
...
fs/nfs/client.c
浏览文件 @
a613fa16
...
...
@@ -89,7 +89,7 @@ static bool nfs4_disable_idmapping = true;
/*
* RPC cruft for NFS
*/
static
struct
rpc_version
*
nfs_version
[
5
]
=
{
static
const
struct
rpc_version
*
nfs_version
[
5
]
=
{
[
2
]
=
&
nfs_version2
,
#ifdef CONFIG_NFS_V3
[
3
]
=
&
nfs_version3
,
...
...
@@ -99,7 +99,7 @@ static struct rpc_version *nfs_version[5] = {
#endif
};
struct
rpc_program
nfs_program
=
{
const
struct
rpc_program
nfs_program
=
{
.
name
=
"nfs"
,
.
number
=
NFS_PROGRAM
,
.
nrvers
=
ARRAY_SIZE
(
nfs_version
),
...
...
@@ -115,11 +115,11 @@ struct rpc_stat nfs_rpcstat = {
#ifdef CONFIG_NFS_V3_ACL
static
struct
rpc_stat
nfsacl_rpcstat
=
{
&
nfsacl_program
};
static
struct
rpc_version
*
nfsacl_version
[]
=
{
static
const
struct
rpc_version
*
nfsacl_version
[]
=
{
[
3
]
=
&
nfsacl_version3
,
};
struct
rpc_program
nfsacl_program
=
{
const
struct
rpc_program
nfsacl_program
=
{
.
name
=
"nfsacl"
,
.
number
=
NFS_ACL_PROGRAM
,
.
nrvers
=
ARRAY_SIZE
(
nfsacl_version
),
...
...
fs/nfs/internal.h
浏览文件 @
a613fa16
...
...
@@ -145,7 +145,7 @@ extern int nfs_mount(struct nfs_mount_request *info);
extern
void
nfs_umount
(
const
struct
nfs_mount_request
*
info
);
/* client.c */
extern
struct
rpc_program
nfs_program
;
extern
const
struct
rpc_program
nfs_program
;
extern
void
nfs_cleanup_cb_ident_idr
(
void
);
extern
void
nfs_put_client
(
struct
nfs_client
*
);
...
...
fs/nfs/mount_clnt.c
浏览文件 @
a613fa16
...
...
@@ -67,7 +67,7 @@ enum {
MOUNTPROC3_EXPORT
=
5
,
};
static
struct
rpc_program
mnt_program
;
static
const
struct
rpc_program
mnt_program
;
/*
* Defined by OpenGroup XNFS Version 3W, chapter 8
...
...
@@ -488,19 +488,19 @@ static struct rpc_procinfo mnt3_procedures[] = {
};
static
struct
rpc_version
mnt_version1
=
{
static
const
struct
rpc_version
mnt_version1
=
{
.
number
=
1
,
.
nrprocs
=
ARRAY_SIZE
(
mnt_procedures
),
.
procs
=
mnt_procedures
,
};
static
struct
rpc_version
mnt_version3
=
{
static
const
struct
rpc_version
mnt_version3
=
{
.
number
=
3
,
.
nrprocs
=
ARRAY_SIZE
(
mnt3_procedures
),
.
procs
=
mnt3_procedures
,
};
static
struct
rpc_version
*
mnt_version
[]
=
{
static
const
struct
rpc_version
*
mnt_version
[]
=
{
NULL
,
&
mnt_version1
,
NULL
,
...
...
@@ -509,7 +509,7 @@ static struct rpc_version *mnt_version[] = {
static
struct
rpc_stat
mnt_stats
;
static
struct
rpc_program
mnt_program
=
{
static
const
struct
rpc_program
mnt_program
=
{
.
name
=
"mount"
,
.
number
=
NFS_MNT_PROGRAM
,
.
nrvers
=
ARRAY_SIZE
(
mnt_version
),
...
...
fs/nfs/nfs2xdr.c
浏览文件 @
a613fa16
...
...
@@ -1150,7 +1150,7 @@ struct rpc_procinfo nfs_procedures[] = {
PROC
(
STATFS
,
fhandle
,
statfsres
,
0
),
};
struct
rpc_version
nfs_version2
=
{
const
struct
rpc_version
nfs_version2
=
{
.
number
=
2
,
.
nrprocs
=
ARRAY_SIZE
(
nfs_procedures
),
.
procs
=
nfs_procedures
...
...
fs/nfs/nfs3xdr.c
浏览文件 @
a613fa16
...
...
@@ -2461,7 +2461,7 @@ struct rpc_procinfo nfs3_procedures[] = {
PROC
(
COMMIT
,
commit
,
commit
,
5
),
};
struct
rpc_version
nfs_version3
=
{
const
struct
rpc_version
nfs_version3
=
{
.
number
=
3
,
.
nrprocs
=
ARRAY_SIZE
(
nfs3_procedures
),
.
procs
=
nfs3_procedures
...
...
@@ -2489,7 +2489,7 @@ static struct rpc_procinfo nfs3_acl_procedures[] = {
},
};
struct
rpc_version
nfsacl_version3
=
{
const
struct
rpc_version
nfsacl_version3
=
{
.
number
=
3
,
.
nrprocs
=
sizeof
(
nfs3_acl_procedures
)
/
sizeof
(
nfs3_acl_procedures
[
0
]),
...
...
fs/nfs/nfs4xdr.c
浏览文件 @
a613fa16
...
...
@@ -7109,7 +7109,7 @@ struct rpc_procinfo nfs4_procedures[] = {
#endif
/* CONFIG_NFS_V4_1 */
};
struct
rpc_version
nfs_version4
=
{
const
struct
rpc_version
nfs_version4
=
{
.
number
=
4
,
.
nrprocs
=
ARRAY_SIZE
(
nfs4_procedures
),
.
procs
=
nfs4_procedures
...
...
fs/nfsd/nfs4callback.c
浏览文件 @
a613fa16
...
...
@@ -605,18 +605,18 @@ static struct rpc_version nfs_cb_version4 = {
.
procs
=
nfs4_cb_procedures
};
static
struct
rpc_version
*
nfs_cb_version
[]
=
{
static
const
struct
rpc_version
*
nfs_cb_version
[]
=
{
&
nfs_cb_version4
,
};
static
struct
rpc_program
cb_program
;
static
const
struct
rpc_program
cb_program
;
static
struct
rpc_stat
cb_stats
=
{
.
program
=
&
cb_program
};
#define NFS4_CALLBACK 0x40000000
static
struct
rpc_program
cb_program
=
{
static
const
struct
rpc_program
cb_program
=
{
.
name
=
"nfs4_cb"
,
.
number
=
NFS4_CALLBACK
,
.
nrvers
=
ARRAY_SIZE
(
nfs_cb_version
),
...
...
include/linux/lockd/lockd.h
浏览文件 @
a613fa16
...
...
@@ -188,7 +188,7 @@ struct nlm_block {
/*
* Global variables
*/
extern
struct
rpc_program
nlm_program
;
extern
const
struct
rpc_program
nlm_program
;
extern
struct
svc_procedure
nlmsvc_procedures
[];
#ifdef CONFIG_LOCKD_V4
extern
struct
svc_procedure
nlmsvc_procedures4
[];
...
...
include/linux/lockd/xdr4.h
浏览文件 @
a613fa16
...
...
@@ -42,6 +42,6 @@ int nlmclt_encode_lockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
int nlmclt_encode_cancargs(struct rpc_rqst *, u32 *, struct nlm_args *);
int nlmclt_encode_unlockargs(struct rpc_rqst *, u32 *, struct nlm_args *);
*/
extern
struct
rpc_version
nlm_version4
;
extern
const
struct
rpc_version
nlm_version4
;
#endif
/* LOCKD_XDR4_H */
include/linux/nfs_xdr.h
浏览文件 @
a613fa16
...
...
@@ -1274,11 +1274,11 @@ struct nfs_rpc_ops {
extern
const
struct
nfs_rpc_ops
nfs_v2_clientops
;
extern
const
struct
nfs_rpc_ops
nfs_v3_clientops
;
extern
const
struct
nfs_rpc_ops
nfs_v4_clientops
;
extern
struct
rpc_version
nfs_version2
;
extern
struct
rpc_version
nfs_version3
;
extern
struct
rpc_version
nfs_version4
;
extern
const
struct
rpc_version
nfs_version2
;
extern
const
struct
rpc_version
nfs_version3
;
extern
const
struct
rpc_version
nfs_version4
;
extern
struct
rpc_version
nfsacl_version3
;
extern
struct
rpc_program
nfsacl_program
;
extern
const
struct
rpc_version
nfsacl_version3
;
extern
const
struct
rpc_program
nfsacl_program
;
#endif
include/linux/sunrpc/clnt.h
浏览文件 @
a613fa16
...
...
@@ -61,7 +61,7 @@ struct rpc_clnt {
struct
rpc_clnt
*
cl_parent
;
/* Points to parent of clones */
struct
rpc_rtt
cl_rtt_default
;
struct
rpc_timeout
cl_timeout_default
;
struct
rpc_program
*
cl_program
;
const
struct
rpc_program
*
cl_program
;
char
*
cl_principal
;
/* target to authenticate to */
};
...
...
@@ -73,7 +73,7 @@ struct rpc_program {
const
char
*
name
;
/* protocol name */
u32
number
;
/* program number */
unsigned
int
nrvers
;
/* number of versions */
struct
rpc_version
**
version
;
/* version array */
const
struct
rpc_version
**
version
;
/* version array */
struct
rpc_stat
*
stats
;
/* statistics */
const
char
*
pipe_dir_name
;
/* path to rpc_pipefs dir */
};
...
...
@@ -109,7 +109,7 @@ struct rpc_create_args {
struct
sockaddr
*
saddress
;
const
struct
rpc_timeout
*
timeout
;
const
char
*
servername
;
struct
rpc_program
*
program
;
const
struct
rpc_program
*
program
;
u32
prognumber
;
/* overrides program->number */
u32
version
;
rpc_authflavor_t
authflavor
;
...
...
@@ -128,7 +128,7 @@ struct rpc_create_args {
struct
rpc_clnt
*
rpc_create
(
struct
rpc_create_args
*
args
);
struct
rpc_clnt
*
rpc_bind_new_program
(
struct
rpc_clnt
*
,
struct
rpc_program
*
,
u32
);
const
struct
rpc_program
*
,
u32
);
void
rpc_task_reset_client
(
struct
rpc_task
*
task
,
struct
rpc_clnt
*
clnt
);
struct
rpc_clnt
*
rpc_clone_client
(
struct
rpc_clnt
*
);
void
rpc_shutdown_client
(
struct
rpc_clnt
*
);
...
...
include/linux/sunrpc/stats.h
浏览文件 @
a613fa16
...
...
@@ -12,7 +12,7 @@
#include <linux/proc_fs.h>
struct
rpc_stat
{
struct
rpc_program
*
program
;
const
struct
rpc_program
*
program
;
unsigned
int
netcnt
,
netudpcnt
,
...
...
@@ -60,7 +60,7 @@ void rpc_modcount(struct inode *, int);
#ifdef CONFIG_PROC_FS
struct
proc_dir_entry
*
rpc_proc_register
(
struct
net
*
,
struct
rpc_stat
*
);
void
rpc_proc_unregister
(
struct
net
*
,
const
char
*
);
void
rpc_proc_zero
(
struct
rpc_program
*
);
void
rpc_proc_zero
(
const
struct
rpc_program
*
);
struct
proc_dir_entry
*
svc_proc_register
(
struct
net
*
,
struct
svc_stat
*
,
const
struct
file_operations
*
);
void
svc_proc_unregister
(
struct
net
*
,
const
char
*
);
...
...
@@ -71,7 +71,7 @@ void svc_seq_show(struct seq_file *,
static
inline
struct
proc_dir_entry
*
rpc_proc_register
(
struct
net
*
net
,
struct
rpc_stat
*
s
)
{
return
NULL
;
}
static
inline
void
rpc_proc_unregister
(
struct
net
*
net
,
const
char
*
p
)
{}
static
inline
void
rpc_proc_zero
(
struct
rpc_program
*
p
)
{}
static
inline
void
rpc_proc_zero
(
const
struct
rpc_program
*
p
)
{}
static
inline
struct
proc_dir_entry
*
svc_proc_register
(
struct
net
*
net
,
struct
svc_stat
*
s
,
const
struct
file_operations
*
f
)
{
return
NULL
;
}
...
...
net/sunrpc/clnt.c
浏览文件 @
a613fa16
...
...
@@ -238,8 +238,8 @@ void rpc_clients_notifier_unregister(void)
static
struct
rpc_clnt
*
rpc_new_client
(
const
struct
rpc_create_args
*
args
,
struct
rpc_xprt
*
xprt
)
{
struct
rpc_program
*
program
=
args
->
program
;
struct
rpc_version
*
version
;
const
struct
rpc_program
*
program
=
args
->
program
;
const
struct
rpc_version
*
version
;
struct
rpc_clnt
*
clnt
=
NULL
;
struct
rpc_auth
*
auth
;
int
err
;
...
...
@@ -626,11 +626,11 @@ rpc_release_client(struct rpc_clnt *clnt)
* The Sun NFSv2/v3 ACL protocol can do this.
*/
struct
rpc_clnt
*
rpc_bind_new_program
(
struct
rpc_clnt
*
old
,
struct
rpc_program
*
program
,
const
struct
rpc_program
*
program
,
u32
vers
)
{
struct
rpc_clnt
*
clnt
;
struct
rpc_version
*
version
;
const
struct
rpc_version
*
version
;
int
err
;
BUG_ON
(
vers
>=
program
->
nrvers
||
!
program
->
version
[
vers
]);
...
...
net/sunrpc/rpcb_clnt.c
浏览文件 @
a613fa16
...
...
@@ -112,7 +112,7 @@ enum {
static
void
rpcb_getport_done
(
struct
rpc_task
*
,
void
*
);
static
void
rpcb_map_release
(
void
*
data
);
static
struct
rpc_program
rpcb_program
;
static
const
struct
rpc_program
rpcb_program
;
struct
rpcbind_args
{
struct
rpc_xprt
*
r_xprt
;
...
...
@@ -137,8 +137,8 @@ struct rpcb_info {
struct
rpc_procinfo
*
rpc_proc
;
};
static
struct
rpcb_info
rpcb_next_version
[];
static
struct
rpcb_info
rpcb_next_version6
[];
static
const
struct
rpcb_info
rpcb_next_version
[];
static
const
struct
rpcb_info
rpcb_next_version6
[];
static
const
struct
rpc_call_ops
rpcb_getport_ops
=
{
.
rpc_call_done
=
rpcb_getport_done
,
...
...
@@ -1051,7 +1051,7 @@ static struct rpc_procinfo rpcb_procedures4[] = {
},
};
static
struct
rpcb_info
rpcb_next_version
[]
=
{
static
const
struct
rpcb_info
rpcb_next_version
[]
=
{
{
.
rpc_vers
=
RPCBVERS_2
,
.
rpc_proc
=
&
rpcb_procedures2
[
RPCBPROC_GETPORT
],
...
...
@@ -1061,7 +1061,7 @@ static struct rpcb_info rpcb_next_version[] = {
},
};
static
struct
rpcb_info
rpcb_next_version6
[]
=
{
static
const
struct
rpcb_info
rpcb_next_version6
[]
=
{
{
.
rpc_vers
=
RPCBVERS_4
,
.
rpc_proc
=
&
rpcb_procedures4
[
RPCBPROC_GETADDR
],
...
...
@@ -1075,25 +1075,25 @@ static struct rpcb_info rpcb_next_version6[] = {
},
};
static
struct
rpc_version
rpcb_version2
=
{
static
const
struct
rpc_version
rpcb_version2
=
{
.
number
=
RPCBVERS_2
,
.
nrprocs
=
ARRAY_SIZE
(
rpcb_procedures2
),
.
procs
=
rpcb_procedures2
};
static
struct
rpc_version
rpcb_version3
=
{
static
const
struct
rpc_version
rpcb_version3
=
{
.
number
=
RPCBVERS_3
,
.
nrprocs
=
ARRAY_SIZE
(
rpcb_procedures3
),
.
procs
=
rpcb_procedures3
};
static
struct
rpc_version
rpcb_version4
=
{
static
const
struct
rpc_version
rpcb_version4
=
{
.
number
=
RPCBVERS_4
,
.
nrprocs
=
ARRAY_SIZE
(
rpcb_procedures4
),
.
procs
=
rpcb_procedures4
};
static
struct
rpc_version
*
rpcb_version
[]
=
{
static
const
struct
rpc_version
*
rpcb_version
[]
=
{
NULL
,
NULL
,
&
rpcb_version2
,
...
...
@@ -1103,7 +1103,7 @@ static struct rpc_version *rpcb_version[] = {
static
struct
rpc_stat
rpcb_stats
;
static
struct
rpc_program
rpcb_program
=
{
static
const
struct
rpc_program
rpcb_program
=
{
.
name
=
"rpcbind"
,
.
number
=
RPCBIND_PROGRAM
,
.
nrvers
=
ARRAY_SIZE
(
rpcb_version
),
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录