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>
This commit is contained in:

committed by
Linus Torvalds

parent
6f5071020d
commit
f0f37e2f77
@@ -1184,7 +1184,7 @@ out:
|
||||
return ret > 0 ? EIO : ret;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct btrfs_file_vm_ops = {
|
||||
static const struct vm_operations_struct btrfs_file_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = btrfs_page_mkwrite,
|
||||
};
|
||||
|
@@ -81,7 +81,7 @@ ext4_file_write(struct kiocb *iocb, const struct iovec *iov,
|
||||
return generic_file_aio_write(iocb, iov, nr_segs, pos);
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ext4_file_vm_ops = {
|
||||
static const struct vm_operations_struct ext4_file_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = ext4_page_mkwrite,
|
||||
};
|
||||
|
@@ -1313,7 +1313,7 @@ static int fuse_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct fuse_file_vm_ops = {
|
||||
static const struct vm_operations_struct fuse_file_vm_ops = {
|
||||
.close = fuse_vma_close,
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = fuse_page_mkwrite,
|
||||
|
@@ -418,7 +418,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct gfs2_vm_ops = {
|
||||
static const struct vm_operations_struct gfs2_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = gfs2_page_mkwrite,
|
||||
};
|
||||
|
@@ -95,7 +95,7 @@ static int ncp_file_mmap_fault(struct vm_area_struct *area,
|
||||
return VM_FAULT_MAJOR;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ncp_file_mmap =
|
||||
static const struct vm_operations_struct ncp_file_mmap =
|
||||
{
|
||||
.fault = ncp_file_mmap_fault,
|
||||
};
|
||||
|
@@ -59,7 +59,7 @@ static int nfs_lock(struct file *filp, int cmd, struct file_lock *fl);
|
||||
static int nfs_flock(struct file *filp, int cmd, struct file_lock *fl);
|
||||
static int nfs_setlease(struct file *file, long arg, struct file_lock **fl);
|
||||
|
||||
static struct vm_operations_struct nfs_file_vm_ops;
|
||||
static const struct vm_operations_struct nfs_file_vm_ops;
|
||||
|
||||
const struct file_operations nfs_file_operations = {
|
||||
.llseek = nfs_file_llseek,
|
||||
@@ -572,7 +572,7 @@ out_unlock:
|
||||
return VM_FAULT_SIGBUS;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct nfs_file_vm_ops = {
|
||||
static const struct vm_operations_struct nfs_file_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = nfs_vm_page_mkwrite,
|
||||
};
|
||||
|
@@ -117,7 +117,7 @@ static int nilfs_page_mkwrite(struct vm_area_struct *vma, struct vm_fault *vmf)
|
||||
return 0;
|
||||
}
|
||||
|
||||
struct vm_operations_struct nilfs_file_vm_ops = {
|
||||
static const struct vm_operations_struct nilfs_file_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = nilfs_page_mkwrite,
|
||||
};
|
||||
|
@@ -202,7 +202,7 @@ out:
|
||||
return ret;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ocfs2_file_vm_ops = {
|
||||
static const struct vm_operations_struct ocfs2_file_vm_ops = {
|
||||
.fault = ocfs2_fault,
|
||||
.page_mkwrite = ocfs2_page_mkwrite,
|
||||
};
|
||||
|
@@ -40,7 +40,7 @@ struct bin_buffer {
|
||||
struct mutex mutex;
|
||||
void *buffer;
|
||||
int mmapped;
|
||||
struct vm_operations_struct *vm_ops;
|
||||
const struct vm_operations_struct *vm_ops;
|
||||
struct file *file;
|
||||
struct hlist_node list;
|
||||
};
|
||||
@@ -331,7 +331,7 @@ static int bin_migrate(struct vm_area_struct *vma, const nodemask_t *from,
|
||||
}
|
||||
#endif
|
||||
|
||||
static struct vm_operations_struct bin_vm_ops = {
|
||||
static const struct vm_operations_struct bin_vm_ops = {
|
||||
.open = bin_vma_open,
|
||||
.close = bin_vma_close,
|
||||
.fault = bin_fault,
|
||||
|
@@ -1534,7 +1534,7 @@ out_unlock:
|
||||
return err;
|
||||
}
|
||||
|
||||
static struct vm_operations_struct ubifs_file_vm_ops = {
|
||||
static const struct vm_operations_struct ubifs_file_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = ubifs_vm_page_mkwrite,
|
||||
};
|
||||
|
@@ -42,7 +42,7 @@
|
||||
|
||||
#include <linux/dcache.h>
|
||||
|
||||
static struct vm_operations_struct xfs_file_vm_ops;
|
||||
static const struct vm_operations_struct xfs_file_vm_ops;
|
||||
|
||||
STATIC ssize_t
|
||||
xfs_file_aio_read(
|
||||
@@ -280,7 +280,7 @@ const struct file_operations xfs_dir_file_operations = {
|
||||
.fsync = xfs_file_fsync,
|
||||
};
|
||||
|
||||
static struct vm_operations_struct xfs_file_vm_ops = {
|
||||
static const struct vm_operations_struct xfs_file_vm_ops = {
|
||||
.fault = filemap_fault,
|
||||
.page_mkwrite = xfs_vm_page_mkwrite,
|
||||
};
|
||||
|
Reference in New Issue
Block a user