From: Erez Zadok Date: Mon, 25 Nov 2013 02:10:46 +0000 (-0500) Subject: Uniofs: port to 3.5 X-Git-Url: https://git.fsl.cs.sunysb.edu/?a=commitdiff_plain;h=79fd0f44acba01eb891f0e1072cff47be944a837;p=unionfs-3.10.y.git Uniofs: port to 3.5 Signed-off-by: Erez Zadok --- diff --git a/fs/unionfs/file.c b/fs/unionfs/file.c index f583c8fc5a24..8a04063930e5 100644 --- a/fs/unionfs/file.c +++ b/fs/unionfs/file.c @@ -156,8 +156,9 @@ static int unionfs_mmap(struct file *file, struct vm_area_struct *vma) goto out; } saved_vm_ops = vma->vm_ops; - err = do_munmap(current->mm, vma->vm_start, - vma->vm_end - vma->vm_start); + up_write(¤t->mm->mmap_sem); /* VFS already holds sema... */ + err = vm_munmap(vma->vm_start, vma->vm_end - vma->vm_start); + down_write(¤t->mm->mmap_sem); if (err) { printk(KERN_ERR "unionfs: do_munmap failed %d\n", err); goto out; diff --git a/fs/unionfs/super.c b/fs/unionfs/super.c index b99f14d1c748..53d289b19c39 100644 --- a/fs/unionfs/super.c +++ b/fs/unionfs/super.c @@ -835,7 +835,7 @@ static void unionfs_evict_inode(struct inode *inode) struct unionfs_dir_state *rdstate; truncate_inode_pages(&inode->i_data, 0); - end_writeback(inode); + clear_inode(inode); list_for_each_safe(pos, n, &UNIONFS_I(inode)->readdircache) { rdstate = list_entry(pos, struct unionfs_dir_state, cache);