@@ -134,7 +134,7 @@ int llog_cat_process(const struct lu_env *env, struct llog_handle *cat_llh,
/* llog_obd.c */
int llog_setup(const struct lu_env *env, struct obd_device *obd,
struct obd_llog_group *olg, int index,
- struct obd_device *disk_obd, struct llog_operations *op);
+ struct obd_device *disk_obd, const struct llog_operations *op);
int __llog_ctxt_put(const struct lu_env *env, struct llog_ctxt *ctxt);
int llog_cleanup(const struct lu_env *env, struct llog_ctxt *);
@@ -225,7 +225,7 @@ struct llog_handle {
} u;
char *lgh_name;
void *private_data;
- struct llog_operations *lgh_logops;
+ const struct llog_operations *lgh_logops;
refcount_t lgh_refcount;
bool lgh_destroyed;
};
@@ -241,7 +241,7 @@ struct llog_ctxt {
struct obd_import *loc_imp; /* to use in RPC's: can be backward
* pointing import
*/
- struct llog_operations *loc_logops;
+ const struct llog_operations *loc_logops;
struct llog_handle *loc_handle;
struct mutex loc_mutex; /* protect loc_imp */
refcount_t loc_refcount;
@@ -257,7 +257,7 @@ struct llog_ctxt {
#define LLOG_DEL_RECORD 0x0002
static inline int llog_handle2ops(struct llog_handle *loghandle,
- struct llog_operations **lop)
+ const struct llog_operations **lop)
{
if (!loghandle || !loghandle->lgh_logops)
return -EINVAL;
@@ -351,7 +351,7 @@ static inline int llog_next_block(const struct lu_env *env,
int next_idx, u64 *cur_offset, void *buf,
int len)
{
- struct llog_operations *lop;
+ const struct llog_operations *lop;
int rc;
rc = llog_handle2ops(loghandle, &lop);
@@ -2409,7 +2409,7 @@ enum timeout_event {
/** @} */
/* ptlrpc/llog_client.c */
-extern struct llog_operations llog_client_ops;
+extern const struct llog_operations llog_client_ops;
/** @} net */
#endif
@@ -1131,7 +1131,7 @@ int ll_revalidate_it_finish(struct ptlrpc_request *request,
struct lookup_intent *it, struct inode *inode);
/* llite/llite_lib.c */
-extern struct super_operations lustre_super_operations;
+extern const struct super_operations lustre_super_operations;
void ll_common_put_super(struct super_block *sb);
void ll_lli_init(struct ll_inode_info *lli);
@@ -83,7 +83,7 @@ static int ll_drop_inode(struct inode *inode)
}
/* exported operations */
-struct super_operations lustre_super_operations = {
+const struct super_operations lustre_super_operations = {
.alloc_inode = ll_alloc_inode,
.destroy_inode = ll_destroy_inode,
.drop_inode = ll_drop_inode,
@@ -1284,7 +1284,7 @@ static void mdc_io_data_version_end(const struct lu_env *env,
}
}
-static struct cl_io_operations mdc_io_ops = {
+static const struct cl_io_operations mdc_io_ops = {
.op = {
[CIT_READ] = {
.cio_iter_init = osc_io_rw_iter_init,
@@ -100,7 +100,7 @@ int llog_handle_put(const struct lu_env *env, struct llog_handle *loghandle)
int rc = 0;
if (refcount_dec_and_test(&loghandle->lgh_refcount)) {
- struct llog_operations *lop;
+ const struct llog_operations *lop;
rc = llog_handle2ops(loghandle, &lop);
if (!rc) {
@@ -118,7 +118,7 @@ static int llog_read_header(const struct lu_env *env,
struct llog_handle *handle,
struct obd_uuid *uuid)
{
- struct llog_operations *lop;
+ const struct llog_operations *lop;
int rc;
rc = llog_handle2ops(handle, &lop);
@@ -135,7 +135,7 @@ int llog_cleanup(const struct lu_env *env, struct llog_ctxt *ctxt)
int llog_setup(const struct lu_env *env, struct obd_device *obd,
struct obd_llog_group *olg, int index,
- struct obd_device *disk_obd, struct llog_operations *op)
+ struct obd_device *disk_obd, const struct llog_operations *op)
{
struct llog_ctxt *ctxt;
int rc = 0;
@@ -352,7 +352,7 @@ static int llog_client_close(const struct lu_env *env,
return 0;
}
-struct llog_operations llog_client_ops = {
+const struct llog_operations llog_client_ops = {
.lop_next_block = llog_client_next_block,
.lop_prev_block = llog_client_prev_block,
.lop_read_header = llog_client_read_header,