From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-pa0-f49.google.com (mail-pa0-f49.google.com [209.85.220.49]) by kanga.kvack.org (Postfix) with ESMTP id 89C156B0031 for ; Tue, 8 Oct 2013 12:14:48 -0400 (EDT) Received: by mail-pa0-f49.google.com with SMTP id ld10so9049414pab.36 for ; Tue, 08 Oct 2013 09:14:48 -0700 (PDT) Message-ID: <52542F53.4020807@sr71.net> Date: Tue, 08 Oct 2013 09:14:11 -0700 From: Dave Hansen MIME-Version: 1.0 Subject: Re: [PATCH 1/2] vmsplice: unmap gifted pages for recipient References: <1381177293-27125-1-git-send-email-rcj@linux.vnet.ibm.com> <1381177293-27125-2-git-send-email-rcj@linux.vnet.ibm.com> In-Reply-To: <1381177293-27125-2-git-send-email-rcj@linux.vnet.ibm.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Sender: owner-linux-mm@kvack.org List-ID: To: Robert C Jennings , linux-kernel@vger.kernel.org Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, Alexander Viro , Rik van Riel , Andrea Arcangeli , Matt Helsley , Anthony Liguori , Michael Roth , Lei Li , Leonardo Garcia , Vlastimil Babka On 10/07/2013 01:21 PM, Robert C Jennings wrote: > + } else { > + if (vma) > + zap_page_range(vma, > + user_start, > + (user_end - > + user_start), > + NULL); > + vma = find_vma_intersection( > + current->mm, > + useraddr, > + (useraddr + > + PAGE_SIZE)); > + if (!IS_ERR_OR_NULL(vma)) { > + user_start = useraddr; > + user_end = (useraddr + > + PAGE_SIZE); > + } else > + vma = NULL; > + } This is pretty unspeakably hideous. Was there truly no better way to do this? -- To unsubscribe, send a message with 'unsubscribe linux-mm' in the body to majordomo@kvack.org. For more info on Linux MM, see: http://www.linux-mm.org/ . Don't email: email@kvack.org