diff --git a/kernel/exit.c b/kernel/exit.c index e3fdd078f449bd2dd79b5f52ce62de9b76694a9d..f451ea0a8440ba38ab5b7175ebb6e5fc6623c724 100644 --- a/kernel/exit.c +++ b/kernel/exit.c @@ -37,7 +37,7 @@ static inline void __unhash_process(struct task_struct *p) list_del(&p->thread_group); p->pid = 0; proc_dentry = p->proc_dentry; - if (unlikely(proc_dentry)) { + if (unlikely(proc_dentry != NULL)) { spin_lock(&dcache_lock); if (!list_empty(&proc_dentry->d_hash)) { dget_locked(proc_dentry); @@ -47,7 +47,7 @@ static inline void __unhash_process(struct task_struct *p) spin_unlock(&dcache_lock); } write_unlock_irq(&tasklist_lock); - if (unlikely(proc_dentry)) { + if (unlikely(proc_dentry != NULL)) { shrink_dcache_parent(proc_dentry); dput(proc_dentry); } diff --git a/mm/mremap.c b/mm/mremap.c index d58627b1b3b4d7dfba70d00053f668175047458e..8056fcfebf0251478b0b963ee3805466c6f41236 100644 --- a/mm/mremap.c +++ b/mm/mremap.c @@ -103,7 +103,6 @@ static int move_one_page(struct vm_area_struct *vma, unsigned long old_addr, uns static int move_page_tables(struct vm_area_struct *vma, unsigned long new_addr, unsigned long old_addr, unsigned long len) { - struct mm_struct *mm = vma->vm_mm; unsigned long offset = len; flush_cache_range(vma, old_addr, old_addr + len);