Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

const: mark struct vm_struct_operations

* mark struct vm_area_struct::vm_ops as const
* mark vm_ops in AGP code

But leave TTM code alone, something is fishy there with global vm_ops
being used.

Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>

authored by

Alexey Dobriyan and committed by
Linus Torvalds
f0f37e2f 6f507102

+83 -83
+2 -2
arch/ia64/ia32/binfmt_elf32.c
··· 69 69 } 70 70 71 71 72 - static struct vm_operations_struct ia32_shared_page_vm_ops = { 72 + static const struct vm_operations_struct ia32_shared_page_vm_ops = { 73 73 .fault = ia32_install_shared_page 74 74 }; 75 75 76 - static struct vm_operations_struct ia32_gate_page_vm_ops = { 76 + static const struct vm_operations_struct ia32_gate_page_vm_ops = { 77 77 .fault = ia32_install_gate_page 78 78 }; 79 79
+7 -7
arch/powerpc/platforms/cell/spufs/file.c
··· 309 309 return len; 310 310 } 311 311 312 - static struct vm_operations_struct spufs_mem_mmap_vmops = { 312 + static const struct vm_operations_struct spufs_mem_mmap_vmops = { 313 313 .fault = spufs_mem_mmap_fault, 314 314 .access = spufs_mem_mmap_access, 315 315 }; ··· 436 436 return spufs_ps_fault(vma, vmf, 0x4000, SPUFS_CNTL_MAP_SIZE); 437 437 } 438 438 439 - static struct vm_operations_struct spufs_cntl_mmap_vmops = { 439 + static const struct vm_operations_struct spufs_cntl_mmap_vmops = { 440 440 .fault = spufs_cntl_mmap_fault, 441 441 }; 442 442 ··· 1143 1143 #endif 1144 1144 } 1145 1145 1146 - static struct vm_operations_struct spufs_signal1_mmap_vmops = { 1146 + static const struct vm_operations_struct spufs_signal1_mmap_vmops = { 1147 1147 .fault = spufs_signal1_mmap_fault, 1148 1148 }; 1149 1149 ··· 1279 1279 #endif 1280 1280 } 1281 1281 1282 - static struct vm_operations_struct spufs_signal2_mmap_vmops = { 1282 + static const struct vm_operations_struct spufs_signal2_mmap_vmops = { 1283 1283 .fault = spufs_signal2_mmap_fault, 1284 1284 }; 1285 1285 ··· 1397 1397 return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_MSS_MAP_SIZE); 1398 1398 } 1399 1399 1400 - static struct vm_operations_struct spufs_mss_mmap_vmops = { 1400 + static const struct vm_operations_struct spufs_mss_mmap_vmops = { 1401 1401 .fault = spufs_mss_mmap_fault, 1402 1402 }; 1403 1403 ··· 1458 1458 return spufs_ps_fault(vma, vmf, 0x0000, SPUFS_PS_MAP_SIZE); 1459 1459 } 1460 1460 1461 - static struct vm_operations_struct spufs_psmap_mmap_vmops = { 1461 + static const struct vm_operations_struct spufs_psmap_mmap_vmops = { 1462 1462 .fault = spufs_psmap_mmap_fault, 1463 1463 }; 1464 1464 ··· 1517 1517 return spufs_ps_fault(vma, vmf, 0x3000, SPUFS_MFC_MAP_SIZE); 1518 1518 } 1519 1519 1520 - static struct vm_operations_struct spufs_mfc_mmap_vmops = { 1520 + static const struct vm_operations_struct spufs_mfc_mmap_vmops = { 1521 1521 .fault = spufs_mfc_mmap_fault, 1522 1522 }; 1523 1523
+1 -1
arch/x86/pci/i386.c
··· 266 266 pci_write_config_byte(dev, PCI_LATENCY_TIMER, lat); 267 267 } 268 268 269 - static struct vm_operations_struct pci_mmap_ops = { 269 + static const struct vm_operations_struct pci_mmap_ops = { 270 270 .access = generic_access_phys, 271 271 }; 272 272
+1 -1
drivers/char/agp/agp.h
··· 131 131 struct agp_bridge_data { 132 132 const struct agp_version *version; 133 133 const struct agp_bridge_driver *driver; 134 - struct vm_operations_struct *vm_ops; 134 + const struct vm_operations_struct *vm_ops; 135 135 void *previous_size; 136 136 void *current_size; 137 137 void *dev_private_data;
+1 -1
drivers/char/agp/alpha-agp.c
··· 40 40 { 0, 0, 0 }, /* filled in by alpha_core_agp_setup */ 41 41 }; 42 42 43 - struct vm_operations_struct alpha_core_agp_vm_ops = { 43 + static const struct vm_operations_struct alpha_core_agp_vm_ops = { 44 44 .fault = alpha_core_agp_vm_fault, 45 45 }; 46 46
+1 -1
drivers/char/mem.c
··· 301 301 } 302 302 #endif 303 303 304 - static struct vm_operations_struct mmap_mem_ops = { 304 + static const struct vm_operations_struct mmap_mem_ops = { 305 305 #ifdef CONFIG_HAVE_IOREMAP_PROT 306 306 .access = generic_access_phys 307 307 #endif
+1 -1
drivers/char/mspec.c
··· 239 239 return VM_FAULT_NOPAGE; 240 240 } 241 241 242 - static struct vm_operations_struct mspec_vm_ops = { 242 + static const struct vm_operations_struct mspec_vm_ops = { 243 243 .open = mspec_open, 244 244 .close = mspec_close, 245 245 .fault = mspec_fault,
+4 -4
drivers/gpu/drm/drm_vm.c
··· 369 369 } 370 370 371 371 /** AGP virtual memory operations */ 372 - static struct vm_operations_struct drm_vm_ops = { 372 + static const struct vm_operations_struct drm_vm_ops = { 373 373 .fault = drm_vm_fault, 374 374 .open = drm_vm_open, 375 375 .close = drm_vm_close, 376 376 }; 377 377 378 378 /** Shared virtual memory operations */ 379 - static struct vm_operations_struct drm_vm_shm_ops = { 379 + static const struct vm_operations_struct drm_vm_shm_ops = { 380 380 .fault = drm_vm_shm_fault, 381 381 .open = drm_vm_open, 382 382 .close = drm_vm_shm_close, 383 383 }; 384 384 385 385 /** DMA virtual memory operations */ 386 - static struct vm_operations_struct drm_vm_dma_ops = { 386 + static const struct vm_operations_struct drm_vm_dma_ops = { 387 387 .fault = drm_vm_dma_fault, 388 388 .open = drm_vm_open, 389 389 .close = drm_vm_close, 390 390 }; 391 391 392 392 /** Scatter-gather virtual memory operations */ 393 - static struct vm_operations_struct drm_vm_sg_ops = { 393 + static const struct vm_operations_struct drm_vm_sg_ops = { 394 394 .fault = drm_vm_sg_fault, 395 395 .open = drm_vm_open, 396 396 .close = drm_vm_close,
+1 -1
drivers/gpu/drm/radeon/radeon_ttm.c
··· 530 530 } 531 531 532 532 static struct vm_operations_struct radeon_ttm_vm_ops; 533 - static struct vm_operations_struct *ttm_vm_ops = NULL; 533 + static const struct vm_operations_struct *ttm_vm_ops = NULL; 534 534 535 535 static int radeon_ttm_fault(struct vm_area_struct *vma, struct vm_fault *vmf) 536 536 {
+1 -1
drivers/gpu/drm/ttm/ttm_bo_vm.c
··· 228 228 vma->vm_private_data = NULL; 229 229 } 230 230 231 - static struct vm_operations_struct ttm_bo_vm_ops = { 231 + static const struct vm_operations_struct ttm_bo_vm_ops = { 232 232 .fault = ttm_bo_vm_fault, 233 233 .open = ttm_bo_vm_open, 234 234 .close = ttm_bo_vm_close
+1 -1
drivers/ieee1394/dma.c
··· 247 247 return 0; 248 248 } 249 249 250 - static struct vm_operations_struct dma_region_vm_ops = { 250 + static const struct vm_operations_struct dma_region_vm_ops = { 251 251 .fault = dma_region_pagefault, 252 252 }; 253 253
+1 -1
drivers/infiniband/hw/ehca/ehca_uverbs.c
··· 95 95 vma->vm_start, vma->vm_end, *count); 96 96 } 97 97 98 - static struct vm_operations_struct vm_ops = { 98 + static const struct vm_operations_struct vm_ops = { 99 99 .open = ehca_mm_open, 100 100 .close = ehca_mm_close, 101 101 };
+1 -1
drivers/infiniband/hw/ipath/ipath_file_ops.c
··· 1151 1151 return 0; 1152 1152 } 1153 1153 1154 - static struct vm_operations_struct ipath_file_vm_ops = { 1154 + static const struct vm_operations_struct ipath_file_vm_ops = { 1155 1155 .fault = ipath_file_vma_fault, 1156 1156 }; 1157 1157
+1 -1
drivers/infiniband/hw/ipath/ipath_mmap.c
··· 74 74 kref_put(&ip->ref, ipath_release_mmap_info); 75 75 } 76 76 77 - static struct vm_operations_struct ipath_vm_ops = { 77 + static const struct vm_operations_struct ipath_vm_ops = { 78 78 .open = ipath_vma_open, 79 79 .close = ipath_vma_close, 80 80 };
+1 -1
drivers/media/video/cafe_ccic.c
··· 1325 1325 mutex_unlock(&sbuf->cam->s_mutex); 1326 1326 } 1327 1327 1328 - static struct vm_operations_struct cafe_v4l_vm_ops = { 1328 + static const struct vm_operations_struct cafe_v4l_vm_ops = { 1329 1329 .open = cafe_v4l_vm_open, 1330 1330 .close = cafe_v4l_vm_close 1331 1331 };
+1 -1
drivers/media/video/et61x251/et61x251_core.c
··· 1496 1496 } 1497 1497 1498 1498 1499 - static struct vm_operations_struct et61x251_vm_ops = { 1499 + static const struct vm_operations_struct et61x251_vm_ops = { 1500 1500 .open = et61x251_vm_open, 1501 1501 .close = et61x251_vm_close, 1502 1502 };
+1 -1
drivers/media/video/gspca/gspca.c
··· 99 99 frame->v4l2_buf.flags &= ~V4L2_BUF_FLAG_MAPPED; 100 100 } 101 101 102 - static struct vm_operations_struct gspca_vm_ops = { 102 + static const struct vm_operations_struct gspca_vm_ops = { 103 103 .open = gspca_vm_open, 104 104 .close = gspca_vm_close, 105 105 };
+1 -1
drivers/media/video/meye.c
··· 1589 1589 meye.vma_use_count[idx]--; 1590 1590 } 1591 1591 1592 - static struct vm_operations_struct meye_vm_ops = { 1592 + static const struct vm_operations_struct meye_vm_ops = { 1593 1593 .open = meye_vm_open, 1594 1594 .close = meye_vm_close, 1595 1595 };
+1 -1
drivers/media/video/sn9c102/sn9c102_core.c
··· 2077 2077 } 2078 2078 2079 2079 2080 - static struct vm_operations_struct sn9c102_vm_ops = { 2080 + static const struct vm_operations_struct sn9c102_vm_ops = { 2081 2081 .open = sn9c102_vm_open, 2082 2082 .close = sn9c102_vm_close, 2083 2083 };
+1 -1
drivers/media/video/stk-webcam.c
··· 790 790 if (sbuf->mapcount == 0) 791 791 sbuf->v4lbuf.flags &= ~V4L2_BUF_FLAG_MAPPED; 792 792 } 793 - static struct vm_operations_struct stk_v4l_vm_ops = { 793 + static const struct vm_operations_struct stk_v4l_vm_ops = { 794 794 .open = stk_v4l_vm_open, 795 795 .close = stk_v4l_vm_close 796 796 };
+1 -1
drivers/media/video/uvc/uvc_v4l2.c
··· 1069 1069 buffer->vma_use_count--; 1070 1070 } 1071 1071 1072 - static struct vm_operations_struct uvc_vm_ops = { 1072 + static const struct vm_operations_struct uvc_vm_ops = { 1073 1073 .open = uvc_vm_open, 1074 1074 .close = uvc_vm_close, 1075 1075 };
+1 -1
drivers/media/video/videobuf-dma-contig.c
··· 105 105 } 106 106 } 107 107 108 - static struct vm_operations_struct videobuf_vm_ops = { 108 + static const struct vm_operations_struct videobuf_vm_ops = { 109 109 .open = videobuf_vm_open, 110 110 .close = videobuf_vm_close, 111 111 };
+1 -1
drivers/media/video/videobuf-dma-sg.c
··· 394 394 return 0; 395 395 } 396 396 397 - static struct vm_operations_struct videobuf_vm_ops = 397 + static const struct vm_operations_struct videobuf_vm_ops = 398 398 { 399 399 .open = videobuf_vm_open, 400 400 .close = videobuf_vm_close,
+1 -1
drivers/media/video/videobuf-vmalloc.c
··· 116 116 return; 117 117 } 118 118 119 - static struct vm_operations_struct videobuf_vm_ops = 119 + static const struct vm_operations_struct videobuf_vm_ops = 120 120 { 121 121 .open = videobuf_vm_open, 122 122 .close = videobuf_vm_close,
+1 -1
drivers/media/video/vino.c
··· 3857 3857 dprintk("vino_vm_close(): count = %d\n", fb->map_count); 3858 3858 } 3859 3859 3860 - static struct vm_operations_struct vino_vm_ops = { 3860 + static const struct vm_operations_struct vino_vm_ops = { 3861 3861 .open = vino_vm_open, 3862 3862 .close = vino_vm_close, 3863 3863 };
+1 -1
drivers/media/video/zc0301/zc0301_core.c
··· 935 935 } 936 936 937 937 938 - static struct vm_operations_struct zc0301_vm_ops = { 938 + static const struct vm_operations_struct zc0301_vm_ops = { 939 939 .open = zc0301_vm_open, 940 940 .close = zc0301_vm_close, 941 941 };
+1 -1
drivers/media/video/zoran/zoran_driver.c
··· 3172 3172 mutex_unlock(&zr->resource_lock); 3173 3173 } 3174 3174 3175 - static struct vm_operations_struct zoran_vm_ops = { 3175 + static const struct vm_operations_struct zoran_vm_ops = { 3176 3176 .open = zoran_vm_open, 3177 3177 .close = zoran_vm_close, 3178 3178 };
+1 -1
drivers/misc/sgi-gru/grufile.c
··· 438 438 .fops = &gru_fops, 439 439 }; 440 440 441 - struct vm_operations_struct gru_vm_ops = { 441 + const struct vm_operations_struct gru_vm_ops = { 442 442 .close = gru_vma_close, 443 443 .fault = gru_fault, 444 444 };
+1 -1
drivers/misc/sgi-gru/grutables.h
··· 624 624 */ 625 625 struct gru_unload_context_req; 626 626 627 - extern struct vm_operations_struct gru_vm_ops; 627 + extern const struct vm_operations_struct gru_vm_ops; 628 628 extern struct device *grudev; 629 629 630 630 extern struct gru_vma_data *gru_alloc_vma_data(struct vm_area_struct *vma,
+1 -1
drivers/scsi/sg.c
··· 1185 1185 return VM_FAULT_SIGBUS; 1186 1186 } 1187 1187 1188 - static struct vm_operations_struct sg_mmap_vm_ops = { 1188 + static const struct vm_operations_struct sg_mmap_vm_ops = { 1189 1189 .fault = sg_vma_fault, 1190 1190 }; 1191 1191
+1 -1
drivers/uio/uio.c
··· 658 658 return 0; 659 659 } 660 660 661 - static struct vm_operations_struct uio_vm_ops = { 661 + static const struct vm_operations_struct uio_vm_ops = { 662 662 .open = uio_vma_open, 663 663 .close = uio_vma_close, 664 664 .fault = uio_vma_fault,
+1 -1
drivers/usb/mon/mon_bin.c
··· 1174 1174 return 0; 1175 1175 } 1176 1176 1177 - static struct vm_operations_struct mon_bin_vm_ops = { 1177 + static const struct vm_operations_struct mon_bin_vm_ops = { 1178 1178 .open = mon_bin_vma_open, 1179 1179 .close = mon_bin_vma_close, 1180 1180 .fault = mon_bin_vma_fault,
+1 -1
drivers/video/fb_defio.c
··· 125 125 return 0; 126 126 } 127 127 128 - static struct vm_operations_struct fb_deferred_io_vm_ops = { 128 + static const struct vm_operations_struct fb_deferred_io_vm_ops = { 129 129 .fault = fb_deferred_io_fault, 130 130 .page_mkwrite = fb_deferred_io_mkwrite, 131 131 };
+1 -1
drivers/video/omap/dispc.c
··· 1035 1035 atomic_dec(&dispc.map_count[plane]); 1036 1036 } 1037 1037 1038 - static struct vm_operations_struct mmap_user_ops = { 1038 + static const struct vm_operations_struct mmap_user_ops = { 1039 1039 .open = mmap_user_open, 1040 1040 .close = mmap_user_close, 1041 1041 };
+1 -1
fs/btrfs/file.c
··· 1184 1184 return ret > 0 ? EIO : ret; 1185 1185 } 1186 1186 1187 - static struct vm_operations_struct btrfs_file_vm_ops = { 1187 + static const struct vm_operations_struct btrfs_file_vm_ops = { 1188 1188 .fault = filemap_fault, 1189 1189 .page_mkwrite = btrfs_page_mkwrite, 1190 1190 };
+1 -1
fs/ext4/file.c
··· 81 81 return generic_file_aio_write(iocb, iov, nr_segs, pos); 82 82 } 83 83 84 - static struct vm_operations_struct ext4_file_vm_ops = { 84 + static const struct vm_operations_struct ext4_file_vm_ops = { 85 85 .fault = filemap_fault, 86 86 .page_mkwrite = ext4_page_mkwrite, 87 87 };
+1 -1
fs/fuse/file.c
··· 1313 1313 return 0; 1314 1314 } 1315 1315 1316 - static struct vm_operations_struct fuse_file_vm_ops = { 1316 + static const struct vm_operations_struct fuse_file_vm_ops = { 1317 1317 .close = fuse_vma_close, 1318 1318 .fault = filemap_fault, 1319 1319 .page_mkwrite = fuse_page_mkwrite,
+1 -1
fs/gfs2/file.c
··· 418 418 return ret; 419 419 } 420 420 421 - static struct vm_operations_struct gfs2_vm_ops = { 421 + static const struct vm_operations_struct gfs2_vm_ops = { 422 422 .fault = filemap_fault, 423 423 .page_mkwrite = gfs2_page_mkwrite, 424 424 };
+1 -1
fs/ncpfs/mmap.c
··· 95 95 return VM_FAULT_MAJOR; 96 96 } 97 97 98 - static struct vm_operations_struct ncp_file_mmap = 98 + static const struct vm_operations_struct ncp_file_mmap = 99 99 { 100 100 .fault = ncp_file_mmap_fault, 101 101 };
+2 -2
fs/nfs/file.c
··· 59 59 static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl); 60 60 static int nfs_setlease(struct file *file, long arg, struct file_lock **fl); 61 61 62 - static struct vm_operations_struct nfs_file_vm_ops; 62 + static const struct vm_operations_struct nfs_file_vm_ops; 63 63 64 64 const struct file_operations nfs_file_operations = { 65 65 .llseek = nfs_file_llseek, ··· 572 572 return VM_FAULT_SIGBUS; 573 573 } 574 574 575 - static struct vm_operations_struct nfs_file_vm_ops = { 575 + static const struct vm_operations_struct nfs_file_vm_ops = { 576 576 .fault = filemap_fault, 577 577 .page_mkwrite = nfs_vm_page_mkwrite, 578 578 };
+1 -1
fs/nilfs2/file.c
··· 117 117 return 0; 118 118 } 119 119 120 - struct vm_operations_struct nilfs_file_vm_ops = { 120 + static const struct vm_operations_struct nilfs_file_vm_ops = { 121 121 .fault = filemap_fault, 122 122 .page_mkwrite = nilfs_page_mkwrite, 123 123 };
+1 -1
fs/ocfs2/mmap.c
··· 202 202 return ret; 203 203 } 204 204 205 - static struct vm_operations_struct ocfs2_file_vm_ops = { 205 + static const struct vm_operations_struct ocfs2_file_vm_ops = { 206 206 .fault = ocfs2_fault, 207 207 .page_mkwrite = ocfs2_page_mkwrite, 208 208 };
+2 -2
fs/sysfs/bin.c
··· 40 40 struct mutex mutex; 41 41 void *buffer; 42 42 int mmapped; 43 - struct vm_operations_struct *vm_ops; 43 + const struct vm_operations_struct *vm_ops; 44 44 struct file *file; 45 45 struct hlist_node list; 46 46 }; ··· 331 331 } 332 332 #endif 333 333 334 - static struct vm_operations_struct bin_vm_ops = { 334 + static const struct vm_operations_struct bin_vm_ops = { 335 335 .open = bin_vma_open, 336 336 .close = bin_vma_close, 337 337 .fault = bin_fault,
+1 -1
fs/ubifs/file.c
··· 1534 1534 return err; 1535 1535 } 1536 1536 1537 - static struct vm_operations_struct ubifs_file_vm_ops = { 1537 + static const struct vm_operations_struct ubifs_file_vm_ops = { 1538 1538 .fault = filemap_fault, 1539 1539 .page_mkwrite = ubifs_vm_page_mkwrite, 1540 1540 };
+2 -2
fs/xfs/linux-2.6/xfs_file.c
··· 42 42 43 43 #include <linux/dcache.h> 44 44 45 - static struct vm_operations_struct xfs_file_vm_ops; 45 + static const struct vm_operations_struct xfs_file_vm_ops; 46 46 47 47 STATIC ssize_t 48 48 xfs_file_aio_read( ··· 280 280 .fsync = xfs_file_fsync, 281 281 }; 282 282 283 - static struct vm_operations_struct xfs_file_vm_ops = { 283 + static const struct vm_operations_struct xfs_file_vm_ops = { 284 284 .fault = filemap_fault, 285 285 .page_mkwrite = xfs_vm_page_mkwrite, 286 286 };
+1 -1
include/linux/agp_backend.h
··· 53 53 int current_memory; 54 54 bool cant_use_aperture; 55 55 unsigned long page_mask; 56 - struct vm_operations_struct *vm_ops; 56 + const struct vm_operations_struct *vm_ops; 57 57 }; 58 58 59 59 /*
+1 -1
include/linux/hugetlb.h
··· 163 163 } 164 164 165 165 extern const struct file_operations hugetlbfs_file_operations; 166 - extern struct vm_operations_struct hugetlb_vm_ops; 166 + extern const struct vm_operations_struct hugetlb_vm_ops; 167 167 struct file *hugetlb_file_setup(const char *name, size_t size, int acct, 168 168 struct user_struct **user, int creat_flags); 169 169 int hugetlb_get_quota(struct address_space *mapping, long delta);
+1 -1
include/linux/mm_types.h
··· 171 171 struct anon_vma *anon_vma; /* Serialized by page_table_lock */ 172 172 173 173 /* Function pointers to deal with this struct. */ 174 - struct vm_operations_struct * vm_ops; 174 + const struct vm_operations_struct *vm_ops; 175 175 176 176 /* Information about our backing store: */ 177 177 unsigned long vm_pgoff; /* Offset (within vm_file) in PAGE_SIZE
+1 -1
include/linux/ramfs.h
··· 17 17 #endif 18 18 19 19 extern const struct file_operations ramfs_file_operations; 20 - extern struct vm_operations_struct generic_file_vm_ops; 20 + extern const struct vm_operations_struct generic_file_vm_ops; 21 21 extern int __init init_rootfs(void); 22 22 23 23 #endif
+2 -2
ipc/shm.c
··· 55 55 #define shm_file_data(file) (*((struct shm_file_data **)&(file)->private_data)) 56 56 57 57 static const struct file_operations shm_file_operations; 58 - static struct vm_operations_struct shm_vm_ops; 58 + static const struct vm_operations_struct shm_vm_ops; 59 59 60 60 #define shm_ids(ns) ((ns)->ids[IPC_SHM_IDS]) 61 61 ··· 312 312 .get_unmapped_area = shm_get_unmapped_area, 313 313 }; 314 314 315 - static struct vm_operations_struct shm_vm_ops = { 315 + static const struct vm_operations_struct shm_vm_ops = { 316 316 .open = shm_open, /* callback for a new vm-area open */ 317 317 .close = shm_close, /* callback for when the vm-area is released */ 318 318 .fault = shm_fault,
+1 -1
kernel/perf_event.c
··· 2253 2253 } 2254 2254 } 2255 2255 2256 - static struct vm_operations_struct perf_mmap_vmops = { 2256 + static const struct vm_operations_struct perf_mmap_vmops = { 2257 2257 .open = perf_mmap_open, 2258 2258 .close = perf_mmap_close, 2259 2259 .fault = perf_mmap_fault,
+1 -1
kernel/relay.c
··· 60 60 /* 61 61 * vm_ops for relay file mappings. 62 62 */ 63 - static struct vm_operations_struct relay_file_mmap_ops = { 63 + static const struct vm_operations_struct relay_file_mmap_ops = { 64 64 .fault = relay_buf_fault, 65 65 .close = relay_file_mmap_close, 66 66 };
+1 -1
mm/filemap.c
··· 1611 1611 } 1612 1612 EXPORT_SYMBOL(filemap_fault); 1613 1613 1614 - struct vm_operations_struct generic_file_vm_ops = { 1614 + const struct vm_operations_struct generic_file_vm_ops = { 1615 1615 .fault = filemap_fault, 1616 1616 }; 1617 1617
+1 -1
mm/filemap_xip.c
··· 296 296 } 297 297 } 298 298 299 - static struct vm_operations_struct xip_file_vm_ops = { 299 + static const struct vm_operations_struct xip_file_vm_ops = { 300 300 .fault = xip_file_fault, 301 301 }; 302 302
+1 -1
mm/hugetlb.c
··· 1721 1721 return 0; 1722 1722 } 1723 1723 1724 - struct vm_operations_struct hugetlb_vm_ops = { 1724 + const struct vm_operations_struct hugetlb_vm_ops = { 1725 1725 .fault = hugetlb_vm_op_fault, 1726 1726 .open = hugetlb_vm_op_open, 1727 1727 .close = hugetlb_vm_op_close,
+1 -1
mm/mmap.c
··· 2282 2282 { 2283 2283 } 2284 2284 2285 - static struct vm_operations_struct special_mapping_vmops = { 2285 + static const struct vm_operations_struct special_mapping_vmops = { 2286 2286 .close = special_mapping_close, 2287 2287 .fault = special_mapping_fault, 2288 2288 };
+1 -1
mm/nommu.c
··· 79 79 struct rb_root nommu_region_tree = RB_ROOT; 80 80 DECLARE_RWSEM(nommu_region_sem); 81 81 82 - struct vm_operations_struct generic_file_vm_ops = { 82 + const struct vm_operations_struct generic_file_vm_ops = { 83 83 }; 84 84 85 85 /*
+2 -2
mm/shmem.c
··· 218 218 static const struct inode_operations shmem_inode_operations; 219 219 static const struct inode_operations shmem_dir_inode_operations; 220 220 static const struct inode_operations shmem_special_inode_operations; 221 - static struct vm_operations_struct shmem_vm_ops; 221 + static const struct vm_operations_struct shmem_vm_ops; 222 222 223 223 static struct backing_dev_info shmem_backing_dev_info __read_mostly = { 224 224 .ra_pages = 0, /* No readahead */ ··· 2498 2498 .put_super = shmem_put_super, 2499 2499 }; 2500 2500 2501 - static struct vm_operations_struct shmem_vm_ops = { 2501 + static const struct vm_operations_struct shmem_vm_ops = { 2502 2502 .fault = shmem_fault, 2503 2503 #ifdef CONFIG_NUMA 2504 2504 .set_policy = shmem_set_policy,
+1 -1
net/packet/af_packet.c
··· 2084 2084 atomic_dec(&pkt_sk(sk)->mapped); 2085 2085 } 2086 2086 2087 - static struct vm_operations_struct packet_mmap_ops = { 2087 + static const struct vm_operations_struct packet_mmap_ops = { 2088 2088 .open = packet_mm_open, 2089 2089 .close = packet_mm_close, 2090 2090 };
+4 -4
sound/core/pcm_native.c
··· 2985 2985 return 0; 2986 2986 } 2987 2987 2988 - static struct vm_operations_struct snd_pcm_vm_ops_status = 2988 + static const struct vm_operations_struct snd_pcm_vm_ops_status = 2989 2989 { 2990 2990 .fault = snd_pcm_mmap_status_fault, 2991 2991 }; ··· 3024 3024 return 0; 3025 3025 } 3026 3026 3027 - static struct vm_operations_struct snd_pcm_vm_ops_control = 3027 + static const struct vm_operations_struct snd_pcm_vm_ops_control = 3028 3028 { 3029 3029 .fault = snd_pcm_mmap_control_fault, 3030 3030 }; ··· 3094 3094 return 0; 3095 3095 } 3096 3096 3097 - static struct vm_operations_struct snd_pcm_vm_ops_data = 3097 + static const struct vm_operations_struct snd_pcm_vm_ops_data = 3098 3098 { 3099 3099 .open = snd_pcm_mmap_data_open, 3100 3100 .close = snd_pcm_mmap_data_close, ··· 3118 3118 * mmap the DMA buffer on I/O memory area 3119 3119 */ 3120 3120 #if SNDRV_PCM_INFO_MMAP_IOMEM 3121 - static struct vm_operations_struct snd_pcm_vm_ops_data_mmio = 3121 + static const struct vm_operations_struct snd_pcm_vm_ops_data_mmio = 3122 3122 { 3123 3123 .open = snd_pcm_mmap_data_open, 3124 3124 .close = snd_pcm_mmap_data_close,
+1 -1
sound/usb/usx2y/us122l.c
··· 154 154 snd_printdd(KERN_DEBUG "%i\n", atomic_read(&us122l->mmap_count)); 155 155 } 156 156 157 - static struct vm_operations_struct usb_stream_hwdep_vm_ops = { 157 + static const struct vm_operations_struct usb_stream_hwdep_vm_ops = { 158 158 .open = usb_stream_hwdep_vm_open, 159 159 .fault = usb_stream_hwdep_vm_fault, 160 160 .close = usb_stream_hwdep_vm_close,
+1 -1
sound/usb/usx2y/usX2Yhwdep.c
··· 53 53 return 0; 54 54 } 55 55 56 - static struct vm_operations_struct us428ctls_vm_ops = { 56 + static const struct vm_operations_struct us428ctls_vm_ops = { 57 57 .fault = snd_us428ctls_vm_fault, 58 58 }; 59 59
+1 -1
sound/usb/usx2y/usx2yhwdeppcm.c
··· 697 697 } 698 698 699 699 700 - static struct vm_operations_struct snd_usX2Y_hwdep_pcm_vm_ops = { 700 + static const struct vm_operations_struct snd_usX2Y_hwdep_pcm_vm_ops = { 701 701 .open = snd_usX2Y_hwdep_pcm_vm_open, 702 702 .close = snd_usX2Y_hwdep_pcm_vm_close, 703 703 .fault = snd_usX2Y_hwdep_pcm_vm_fault,
+2 -2
virt/kvm/kvm_main.c
··· 1713 1713 return 0; 1714 1714 } 1715 1715 1716 - static struct vm_operations_struct kvm_vcpu_vm_ops = { 1716 + static const struct vm_operations_struct kvm_vcpu_vm_ops = { 1717 1717 .fault = kvm_vcpu_fault, 1718 1718 }; 1719 1719 ··· 2317 2317 return 0; 2318 2318 } 2319 2319 2320 - static struct vm_operations_struct kvm_vm_vm_ops = { 2320 + static const struct vm_operations_struct kvm_vm_vm_ops = { 2321 2321 .fault = kvm_vm_fault, 2322 2322 }; 2323 2323