Wrapfs: remove unnecessary call to vm_unmap in ->mmap
authorErez Zadok <ezk@cs.sunysb.edu>
Wed, 5 Jun 2013 05:43:12 +0000 (01:43 -0400)
committerErez Zadok <ezk@cs.sunysb.edu>
Wed, 5 Jun 2013 05:43:12 +0000 (01:43 -0400)
Code is unnecessary and causes deadlocks in newer kernels.

Signed-off-by: Erez Zadok <ezk@cs.sunysb.edu>
fs/wrapfs/file.c

index 220599e27fba899f50b4f44e12dbd5b690d0da7a..b73e1f8bc12b965b4bfbabb39c7af09f08109249 100644 (file)
@@ -141,12 +141,6 @@ static int wrapfs_mmap(struct file *file, struct vm_area_struct *vma)
                        goto out;
                }
                saved_vm_ops = vma->vm_ops; /* save: came from lower ->mmap */
-               err = do_munmap(current->mm, vma->vm_start,
-                               vma->vm_end - vma->vm_start);
-               if (err) {
-                       printk(KERN_ERR "wrapfs: do_munmap failed %d\n", err);
-                       goto out;
-               }
        }
 
        /*