From b4e65a298954aa304c69e4b2740114113215a05b Mon Sep 17 00:00:00 2001 From: Erez Zadok Date: Tue, 26 Nov 2013 22:01:34 -0500 Subject: [PATCH] Uniofs: port to 3.5 Signed-off-by: Erez Zadok --- fs/unionfs/file.c | 5 +++-- fs/unionfs/super.c | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) 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); -- 2.43.0