aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--fs/nfs/idmap.c2
-rw-r--r--include/linux/sunrpc/rpc_pipe_fs.h5
-rw-r--r--net/sunrpc/auth_gss/auth_gss.c8
-rw-r--r--net/sunrpc/rpc_pipe.c7
4 files changed, 12 insertions, 10 deletions
diff --git a/fs/nfs/idmap.c b/fs/nfs/idmap.c
index 86147b0ab2cf..fae0d3e52b44 100644
--- a/fs/nfs/idmap.c
+++ b/fs/nfs/idmap.c
@@ -101,7 +101,7 @@ static void idmap_pipe_destroy_msg(struct rpc_pipe_msg *);
101 101
102static unsigned int fnvhash32(const void *, size_t); 102static unsigned int fnvhash32(const void *, size_t);
103 103
104static struct rpc_pipe_ops idmap_upcall_ops = { 104static const struct rpc_pipe_ops idmap_upcall_ops = {
105 .upcall = idmap_pipe_upcall, 105 .upcall = idmap_pipe_upcall,
106 .downcall = idmap_pipe_downcall, 106 .downcall = idmap_pipe_downcall,
107 .destroy_msg = idmap_pipe_destroy_msg, 107 .destroy_msg = idmap_pipe_destroy_msg,
diff --git a/include/linux/sunrpc/rpc_pipe_fs.h b/include/linux/sunrpc/rpc_pipe_fs.h
index cea764c2359f..91f5b13389c5 100644
--- a/include/linux/sunrpc/rpc_pipe_fs.h
+++ b/include/linux/sunrpc/rpc_pipe_fs.h
@@ -32,8 +32,8 @@ struct rpc_inode {
32 wait_queue_head_t waitq; 32 wait_queue_head_t waitq;
33#define RPC_PIPE_WAIT_FOR_OPEN 1 33#define RPC_PIPE_WAIT_FOR_OPEN 1
34 int flags; 34 int flags;
35 struct rpc_pipe_ops *ops;
36 struct delayed_work queue_timeout; 35 struct delayed_work queue_timeout;
36 const struct rpc_pipe_ops *ops;
37}; 37};
38 38
39static inline struct rpc_inode * 39static inline struct rpc_inode *
@@ -46,7 +46,8 @@ extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *);
46 46
47extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); 47extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *);
48extern int rpc_rmdir(struct dentry *); 48extern int rpc_rmdir(struct dentry *);
49extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, struct rpc_pipe_ops *, int flags); 49extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *,
50 const struct rpc_pipe_ops *, int flags);
50extern int rpc_unlink(struct dentry *); 51extern int rpc_unlink(struct dentry *);
51extern struct vfsmount *rpc_get_mount(void); 52extern struct vfsmount *rpc_get_mount(void);
52extern void rpc_put_mount(void); 53extern void rpc_put_mount(void);
diff --git a/net/sunrpc/auth_gss/auth_gss.c b/net/sunrpc/auth_gss/auth_gss.c
index 66d458fc6920..23eb3864ffc0 100644
--- a/net/sunrpc/auth_gss/auth_gss.c
+++ b/net/sunrpc/auth_gss/auth_gss.c
@@ -89,8 +89,8 @@ static struct rpc_wait_queue pipe_version_rpc_waitqueue;
89static DECLARE_WAIT_QUEUE_HEAD(pipe_version_waitqueue); 89static DECLARE_WAIT_QUEUE_HEAD(pipe_version_waitqueue);
90 90
91static void gss_free_ctx(struct gss_cl_ctx *); 91static void gss_free_ctx(struct gss_cl_ctx *);
92static struct rpc_pipe_ops gss_upcall_ops_v0; 92static const struct rpc_pipe_ops gss_upcall_ops_v0;
93static struct rpc_pipe_ops gss_upcall_ops_v1; 93static const struct rpc_pipe_ops gss_upcall_ops_v1;
94 94
95static inline struct gss_cl_ctx * 95static inline struct gss_cl_ctx *
96gss_get_ctx(struct gss_cl_ctx *ctx) 96gss_get_ctx(struct gss_cl_ctx *ctx)
@@ -1507,7 +1507,7 @@ static const struct rpc_credops gss_nullops = {
1507 .crunwrap_resp = gss_unwrap_resp, 1507 .crunwrap_resp = gss_unwrap_resp,
1508}; 1508};
1509 1509
1510static struct rpc_pipe_ops gss_upcall_ops_v0 = { 1510static const struct rpc_pipe_ops gss_upcall_ops_v0 = {
1511 .upcall = gss_pipe_upcall, 1511 .upcall = gss_pipe_upcall,
1512 .downcall = gss_pipe_downcall, 1512 .downcall = gss_pipe_downcall,
1513 .destroy_msg = gss_pipe_destroy_msg, 1513 .destroy_msg = gss_pipe_destroy_msg,
@@ -1515,7 +1515,7 @@ static struct rpc_pipe_ops gss_upcall_ops_v0 = {
1515 .release_pipe = gss_pipe_release, 1515 .release_pipe = gss_pipe_release,
1516}; 1516};
1517 1517
1518static struct rpc_pipe_ops gss_upcall_ops_v1 = { 1518static const struct rpc_pipe_ops gss_upcall_ops_v1 = {
1519 .upcall = gss_pipe_upcall, 1519 .upcall = gss_pipe_upcall,
1520 .downcall = gss_pipe_downcall, 1520 .downcall = gss_pipe_downcall,
1521 .destroy_msg = gss_pipe_destroy_msg, 1521 .destroy_msg = gss_pipe_destroy_msg,
diff --git a/net/sunrpc/rpc_pipe.c b/net/sunrpc/rpc_pipe.c
index 9ced0628d69c..f6f60f625e3f 100644
--- a/net/sunrpc/rpc_pipe.c
+++ b/net/sunrpc/rpc_pipe.c
@@ -125,7 +125,7 @@ static void
125rpc_close_pipes(struct inode *inode) 125rpc_close_pipes(struct inode *inode)
126{ 126{
127 struct rpc_inode *rpci = RPC_I(inode); 127 struct rpc_inode *rpci = RPC_I(inode);
128 struct rpc_pipe_ops *ops; 128 const struct rpc_pipe_ops *ops;
129 int need_release; 129 int need_release;
130 130
131 mutex_lock(&inode->i_mutex); 131 mutex_lock(&inode->i_mutex);
@@ -776,8 +776,9 @@ rpc_rmdir(struct dentry *dentry)
776 * The @private argument passed here will be available to all these methods 776 * The @private argument passed here will be available to all these methods
777 * from the file pointer, via RPC_I(file->f_dentry->d_inode)->private. 777 * from the file pointer, via RPC_I(file->f_dentry->d_inode)->private.
778 */ 778 */
779struct dentry * 779struct dentry *rpc_mkpipe(struct dentry *parent, const char *name,
780rpc_mkpipe(struct dentry *parent, const char *name, void *private, struct rpc_pipe_ops *ops, int flags) 780 void *private, const struct rpc_pipe_ops *ops,
781 int flags)
781{ 782{
782 struct dentry *dentry; 783 struct dentry *dentry;
783 struct inode *dir, *inode; 784 struct inode *dir, *inode;