Merge branch 'linux_next' of git://git.kernel.org/pub/scm/linux/kernel/git/mchehab...
[pandora-kernel.git] / kernel / fork.c
index 4133876..8d932b1 100644 (file)
@@ -413,7 +413,7 @@ static int dup_mmap(struct mm_struct *mm, struct mm_struct *oldmm)
                tmp->vm_next = tmp->vm_prev = NULL;
                file = tmp->vm_file;
                if (file) {
-                       struct inode *inode = file->f_path.dentry->d_inode;
+                       struct inode *inode = file_inode(file);
                        struct address_space *mapping = file->f_mapping;
 
                        get_file(file);
@@ -1861,10 +1861,8 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
                        exit_sem(current);
                }
 
-               if (new_nsproxy) {
+               if (new_nsproxy)
                        switch_task_namespaces(current, new_nsproxy);
-                       new_nsproxy = NULL;
-               }
 
                task_lock(current);
 
@@ -1894,9 +1892,6 @@ SYSCALL_DEFINE1(unshare, unsigned long, unshare_flags)
                }
        }
 
-       if (new_nsproxy)
-               put_nsproxy(new_nsproxy);
-
 bad_unshare_cleanup_cred:
        if (new_cred)
                put_cred(new_cred);