Unionfs: make our lower_vm_ops pointer a const, to match VFS
authorErez Zadok <ezk@cs.sunysb.edu>
Thu, 3 Dec 2009 23:51:37 +0000 (18:51 -0500)
committerErez Zadok <ezk@cs.sunysb.edu>
Sun, 1 Dec 2013 00:53:44 +0000 (19:53 -0500)
Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/unionfs/file.c
fs/unionfs/mmap.c
fs/unionfs/union.h

index 281169ee28ac02cb793aae5664aed0761625d4f3..d68b0d59c5fea2569a2320773428a577f1703949 100644 (file)
@@ -98,7 +98,7 @@ static int unionfs_mmap(struct file *file, struct vm_area_struct *vma)
        struct file *lower_file;
        struct dentry *dentry = file->f_path.dentry;
        struct dentry *parent;
-       struct vm_operations_struct *saved_vm_ops = NULL;
+       const struct vm_operations_struct *saved_vm_ops = NULL;
 
        /*
         * Since mm/memory.c:might_fault() (under PROVE_LOCKING) was
index 18b05d59449ac999825b3367edad44be4b15383d..add4b72b02ba3f07822db6dd1f67a2e2534dab08 100644 (file)
@@ -39,7 +39,7 @@ static int unionfs_fault(struct vm_area_struct *vma, struct vm_fault *vmf)
 {
        int err;
        struct file *file, *lower_file;
-       struct vm_operations_struct *lower_vm_ops;
+       const struct vm_operations_struct *lower_vm_ops;
        struct vm_area_struct lower_vma;
 
        BUG_ON(!vma);
index 17a00567dab2d5004259fd635c743bd3e8329ec1..51b5a1f3f7aad7be86fa3ee5607398d185270165 100644 (file)
@@ -97,7 +97,7 @@ struct unionfs_file_info {
        struct unionfs_dir_state *rdstate;
        struct file **lower_files;
        int *saved_branch_ids; /* IDs of branches when file was opened */
-       struct vm_operations_struct *lower_vm_ops;
+       const struct vm_operations_struct *lower_vm_ops;
        bool wrote_to_file;     /* for delayed copyup */
 };