@@ -221,63 +221,63 @@ struct ocfs2_lock_res_ops {
221
221
*/
222
222
#define LOCK_TYPE_USES_LVB 0x2
223
223
224
- static struct ocfs2_lock_res_ops ocfs2_inode_rw_lops = {
224
+ static const struct ocfs2_lock_res_ops ocfs2_inode_rw_lops = {
225
225
.get_osb = ocfs2_get_inode_osb ,
226
226
.flags = 0 ,
227
227
};
228
228
229
- static struct ocfs2_lock_res_ops ocfs2_inode_inode_lops = {
229
+ static const struct ocfs2_lock_res_ops ocfs2_inode_inode_lops = {
230
230
.get_osb = ocfs2_get_inode_osb ,
231
231
.check_downconvert = ocfs2_check_meta_downconvert ,
232
232
.set_lvb = ocfs2_set_meta_lvb ,
233
233
.downconvert_worker = ocfs2_data_convert_worker ,
234
234
.flags = LOCK_TYPE_REQUIRES_REFRESH |LOCK_TYPE_USES_LVB ,
235
235
};
236
236
237
- static struct ocfs2_lock_res_ops ocfs2_super_lops = {
237
+ static const struct ocfs2_lock_res_ops ocfs2_super_lops = {
238
238
.flags = LOCK_TYPE_REQUIRES_REFRESH ,
239
239
};
240
240
241
- static struct ocfs2_lock_res_ops ocfs2_rename_lops = {
241
+ static const struct ocfs2_lock_res_ops ocfs2_rename_lops = {
242
242
.flags = 0 ,
243
243
};
244
244
245
- static struct ocfs2_lock_res_ops ocfs2_nfs_sync_lops = {
245
+ static const struct ocfs2_lock_res_ops ocfs2_nfs_sync_lops = {
246
246
.flags = 0 ,
247
247
};
248
248
249
- static struct ocfs2_lock_res_ops ocfs2_trim_fs_lops = {
249
+ static const struct ocfs2_lock_res_ops ocfs2_trim_fs_lops = {
250
250
.flags = LOCK_TYPE_REQUIRES_REFRESH |LOCK_TYPE_USES_LVB ,
251
251
};
252
252
253
- static struct ocfs2_lock_res_ops ocfs2_orphan_scan_lops = {
253
+ static const struct ocfs2_lock_res_ops ocfs2_orphan_scan_lops = {
254
254
.flags = LOCK_TYPE_REQUIRES_REFRESH |LOCK_TYPE_USES_LVB ,
255
255
};
256
256
257
- static struct ocfs2_lock_res_ops ocfs2_dentry_lops = {
257
+ static const struct ocfs2_lock_res_ops ocfs2_dentry_lops = {
258
258
.get_osb = ocfs2_get_dentry_osb ,
259
259
.post_unlock = ocfs2_dentry_post_unlock ,
260
260
.downconvert_worker = ocfs2_dentry_convert_worker ,
261
261
.flags = 0 ,
262
262
};
263
263
264
- static struct ocfs2_lock_res_ops ocfs2_inode_open_lops = {
264
+ static const struct ocfs2_lock_res_ops ocfs2_inode_open_lops = {
265
265
.get_osb = ocfs2_get_inode_osb ,
266
266
.flags = 0 ,
267
267
};
268
268
269
- static struct ocfs2_lock_res_ops ocfs2_flock_lops = {
269
+ static const struct ocfs2_lock_res_ops ocfs2_flock_lops = {
270
270
.get_osb = ocfs2_get_file_osb ,
271
271
.flags = 0 ,
272
272
};
273
273
274
- static struct ocfs2_lock_res_ops ocfs2_qinfo_lops = {
274
+ static const struct ocfs2_lock_res_ops ocfs2_qinfo_lops = {
275
275
.set_lvb = ocfs2_set_qinfo_lvb ,
276
276
.get_osb = ocfs2_get_qinfo_osb ,
277
277
.flags = LOCK_TYPE_REQUIRES_REFRESH | LOCK_TYPE_USES_LVB ,
278
278
};
279
279
280
- static struct ocfs2_lock_res_ops ocfs2_refcount_block_lops = {
280
+ static const struct ocfs2_lock_res_ops ocfs2_refcount_block_lops = {
281
281
.check_downconvert = ocfs2_check_refcount_downconvert ,
282
282
.downconvert_worker = ocfs2_refcount_convert_worker ,
283
283
.flags = 0 ,
@@ -510,7 +510,7 @@ static inline void ocfs2_init_start_time(struct ocfs2_mask_waiter *mw)
510
510
static void ocfs2_lock_res_init_common (struct ocfs2_super * osb ,
511
511
struct ocfs2_lock_res * res ,
512
512
enum ocfs2_lock_type type ,
513
- struct ocfs2_lock_res_ops * ops ,
513
+ const struct ocfs2_lock_res_ops * ops ,
514
514
void * priv )
515
515
{
516
516
res -> l_type = type ;
@@ -553,7 +553,7 @@ void ocfs2_inode_lock_res_init(struct ocfs2_lock_res *res,
553
553
unsigned int generation ,
554
554
struct inode * inode )
555
555
{
556
- struct ocfs2_lock_res_ops * ops ;
556
+ const struct ocfs2_lock_res_ops * ops ;
557
557
558
558
switch (type ) {
559
559
case OCFS2_LOCK_TYPE_RW :
0 commit comments