2011-05-08 21:18:48

by Maxin B. John

[permalink] [raw]
Subject: [PATCH] mm: memory: remove unreachable code

Remove the unreachable code found in mm/memory.c

Signed-off-by: Maxin B. John <[email protected]>
---
diff --git a/mm/memory.c b/mm/memory.c
index 27f4253..d3b30af 100644
--- a/mm/memory.c
+++ b/mm/memory.c
@@ -3695,7 +3695,6 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
if (ret <= 0)
#endif
break;
- bytes = ret;
} else {
bytes = len;
offset = addr & (PAGE_SIZE-1);


2011-05-08 21:30:20

by Rik van Riel

[permalink] [raw]
Subject: Re: [PATCH] mm: memory: remove unreachable code

On 05/08/2011 05:18 PM, Maxin B John wrote:
> Remove the unreachable code found in mm/memory.c
>
> Signed-off-by: Maxin B. John<[email protected]>
> ---
> diff --git a/mm/memory.c b/mm/memory.c
> index 27f4253..d3b30af 100644
> --- a/mm/memory.c
> +++ b/mm/memory.c
> @@ -3695,7 +3695,6 @@ static int __access_remote_vm(struct task_struct *tsk, struct mm_struct *mm,
> if (ret<= 0)
> #endif
> break;
> - bytes = ret;
> } else {
> bytes = len;
> offset = addr& (PAGE_SIZE-1);

Is it really impossible for vma->vm_ops->access to return a
positive value?

--
All rights reversed

2011-05-08 21:45:04

by Maxin B. John

[permalink] [raw]
Subject: Re: [PATCH] mm: memory: remove unreachable code

Hi,

>
> Is it really impossible for vma->vm_ops->access to return a
> positive value?
>

Got it .. Thank you very much for pointing it out.

Best Regards,
Maxin