lkml.org 
[lkml]   [2015]   [Feb]   [11]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH 3/4] mm: move gup() -> posix mlock() error conversion out of __mm_populate
On Wed, 11 Feb 2015, Kirill A. Shutemov wrote:

> This is praparation to moving mm_populate()-related code out of
> mm/mlock.c.
>

s/praparation/preparation/

> Signed-off-by: Kirill A. Shutemov <kirill.shutemov@linux.intel.com>
> ---
> mm/mlock.c | 11 +++++++----
> 1 file changed, 7 insertions(+), 4 deletions(-)
>
> diff --git a/mm/mlock.c b/mm/mlock.c
> index c3ea18323034..0837fdb26047 100644
> --- a/mm/mlock.c
> +++ b/mm/mlock.c
> @@ -712,7 +712,6 @@ int __mm_populate(unsigned long start, unsigned long len, int ignore_errors)
> ret = 0;
> continue; /* continue at next VMA */
> }
> - ret = __mlock_posix_error_return(ret);
> break;
> }
> nend = nstart + ret * PAGE_SIZE;
> @@ -750,9 +749,13 @@ SYSCALL_DEFINE2(mlock, unsigned long, start, size_t, len)
> error = do_mlock(start, len, 1);
>
> up_write(&current->mm->mmap_sem);
> - if (!error)
> - error = __mm_populate(start, len, 0);
> - return error;
> + if (error)
> + return error;
> +
> + error = __mm_populate(start, len, 0);
> + if (error)
> + return __mlock_posix_error_return(error);

Extra space?

> + return 0;
> }
>
> SYSCALL_DEFINE2(munlock, unsigned long, start, size_t, len)


\
 
 \ /
  Last update: 2015-02-11 21:21    [W:0.096 / U:7.740 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site