Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756044Ab3JHQOu (ORCPT ); Tue, 8 Oct 2013 12:14:50 -0400 Received: from www.sr71.net ([198.145.64.142]:48972 "EHLO blackbird.sr71.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1752665Ab3JHQOp (ORCPT ); Tue, 8 Oct 2013 12:14:45 -0400 Message-ID: <52542F53.4020807@sr71.net> Date: Tue, 08 Oct 2013 09:14:11 -0700 From: Dave Hansen User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:24.0) Gecko/20100101 Thunderbird/24.0 MIME-Version: 1.0 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 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: linux-kernel-owner@vger.kernel.org List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 837 Lines: 28 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 from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/