diff options
-rw-r--r-- | fs/nfs/idmap.c | 2 | ||||
-rw-r--r-- | include/linux/sunrpc/rpc_pipe_fs.h | 5 | ||||
-rw-r--r-- | net/sunrpc/auth_gss/auth_gss.c | 8 | ||||
-rw-r--r-- | net/sunrpc/rpc_pipe.c | 7 |
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 | ||
102 | static unsigned int fnvhash32(const void *, size_t); | 102 | static unsigned int fnvhash32(const void *, size_t); |
103 | 103 | ||
104 | static struct rpc_pipe_ops idmap_upcall_ops = { | 104 | static 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 | ||
39 | static inline struct rpc_inode * | 39 | static inline struct rpc_inode * |
@@ -46,7 +46,8 @@ extern int rpc_queue_upcall(struct inode *, struct rpc_pipe_msg *); | |||
46 | 46 | ||
47 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); | 47 | extern struct dentry *rpc_mkdir(char *, struct rpc_clnt *); |
48 | extern int rpc_rmdir(struct dentry *); | 48 | extern int rpc_rmdir(struct dentry *); |
49 | extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, struct rpc_pipe_ops *, int flags); | 49 | extern struct dentry *rpc_mkpipe(struct dentry *, const char *, void *, |
50 | const struct rpc_pipe_ops *, int flags); | ||
50 | extern int rpc_unlink(struct dentry *); | 51 | extern int rpc_unlink(struct dentry *); |
51 | extern struct vfsmount *rpc_get_mount(void); | 52 | extern struct vfsmount *rpc_get_mount(void); |
52 | extern void rpc_put_mount(void); | 53 | extern 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; | |||
89 | static DECLARE_WAIT_QUEUE_HEAD(pipe_version_waitqueue); | 89 | static DECLARE_WAIT_QUEUE_HEAD(pipe_version_waitqueue); |
90 | 90 | ||
91 | static void gss_free_ctx(struct gss_cl_ctx *); | 91 | static void gss_free_ctx(struct gss_cl_ctx *); |
92 | static struct rpc_pipe_ops gss_upcall_ops_v0; | 92 | static const struct rpc_pipe_ops gss_upcall_ops_v0; |
93 | static struct rpc_pipe_ops gss_upcall_ops_v1; | 93 | static const struct rpc_pipe_ops gss_upcall_ops_v1; |
94 | 94 | ||
95 | static inline struct gss_cl_ctx * | 95 | static inline struct gss_cl_ctx * |
96 | gss_get_ctx(struct gss_cl_ctx *ctx) | 96 | gss_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 | ||
1510 | static struct rpc_pipe_ops gss_upcall_ops_v0 = { | 1510 | static 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 | ||
1518 | static struct rpc_pipe_ops gss_upcall_ops_v1 = { | 1518 | static 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 | |||
125 | rpc_close_pipes(struct inode *inode) | 125 | rpc_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 | */ |
779 | struct dentry * | 779 | struct dentry *rpc_mkpipe(struct dentry *parent, const char *name, |
780 | rpc_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; |