[PATCH] MD: conditionalize some code
[pandora-kernel.git] / fs / binfmt_elf.c
index 14ea630..d3adfd3 100644 (file)
@@ -544,7 +544,7 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
        unsigned long reloc_func_desc = 0;
        char passed_fileno[6];
        struct files_struct *files;
-       int have_pt_gnu_stack, executable_stack = EXSTACK_DEFAULT;
+       int executable_stack = EXSTACK_DEFAULT;
        unsigned long def_flags = 0;
        struct {
                struct elfhdr elf_ex;
@@ -707,7 +707,6 @@ static int load_elf_binary(struct linux_binprm *bprm, struct pt_regs *regs)
                                executable_stack = EXSTACK_DISABLE_X;
                        break;
                }
-       have_pt_gnu_stack = (i < loc->elf_ex.e_phnum);
 
        /* Some simple consistency checks for the interpreter */
        if (elf_interpreter) {
@@ -1191,7 +1190,7 @@ static int maydump(struct vm_area_struct *vma)
 
        /* Dump shared memory only if mapped from an anonymous file. */
        if (vma->vm_flags & VM_SHARED)
-               return vma->vm_file->f_dentry->d_inode->i_nlink == 0;
+               return vma->vm_file->f_path.dentry->d_inode->i_nlink == 0;
 
        /* If it hasn't been written to, don't write it out */
        if (!vma->anon_vma)
@@ -1318,7 +1317,7 @@ static void fill_prstatus(struct elf_prstatus *prstatus,
        prstatus->pr_pid = p->pid;
        prstatus->pr_ppid = p->parent->pid;
        prstatus->pr_pgrp = process_group(p);
-       prstatus->pr_sid = p->signal->session;
+       prstatus->pr_sid = process_session(p);
        if (thread_group_leader(p)) {
                /*
                 * This is the record for the group leader.  Add in the
@@ -1364,7 +1363,7 @@ static int fill_psinfo(struct elf_prpsinfo *psinfo, struct task_struct *p,
        psinfo->pr_pid = p->pid;
        psinfo->pr_ppid = p->parent->pid;
        psinfo->pr_pgrp = process_group(p);
-       psinfo->pr_sid = p->signal->session;
+       psinfo->pr_sid = process_session(p);
 
        i = p->state ? ffz(~p->state) + 1 : 0;
        psinfo->pr_state = i;