Received: by 10.213.65.68 with SMTP id h4csp298527imn; Wed, 28 Mar 2018 03:56:41 -0700 (PDT) X-Google-Smtp-Source: AIpwx49YuxdT0fzZlqJzFIiQ63N6J1Vz/vRSAZ3TdrkSmtxqRLyQcLWpatJSw7bLb9D3AaWo/aU/ X-Received: by 2002:a17:902:8602:: with SMTP id f2-v6mr3228970plo.73.1522234601839; Wed, 28 Mar 2018 03:56:41 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1522234601; cv=none; d=google.com; s=arc-20160816; b=VIZPzLTqg29jxX82c+VP3jDLt3FQVluz1NdMKIBuksnPHmKqF8ebx/+PJ1PjyOFtVF WLnx16g7wNA/aqgaWc/JG79HCEPHeK4w14oFhTtzuQ/EScjrPVksEgTPus2fGWV191ZZ CmlZG6AxXmQYOlLctCKkOrSvGNaUs/tmaU2syoxVeNkAHXeMyfJ3UAh7BMCfE1dLfBxj 6xW/WKnAAuIL3IxX55sejyNULQRxoZX3K9j+bg0wsgCbZqXbG1xuFybERKFK1Grc2TBo PRu1dQa/ScEBhRvS81sIcjOo0nsDgbKG2ymCqGbF9Obot/tGt6xu4LOpRcIqnRJZbZ8q JWXQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:mime-version:user-agent:references :message-id:in-reply-to:subject:cc:to:from:date:dkim-signature :arc-authentication-results; bh=TglXZvTDFm93E9lOnt1LSMejYGWbtTcRIla4zKeduDQ=; b=gR1ITU0rUdGxoXXJc8i7Kgv2nMViu+fpbhDhxCGXLc9JEvnL3bxd7zp/e5q0Tgu5x7 X14rK/3jjexEerEAKS8V6Qdg1LSXG86bZEbAazbBM+txr9ifZnFy9Ykyz2U6J74ZZh4L PyrKxbTppkM1yhTAl6zCZECShgtM/qRwwRbK1fPr8gpGT+CU+zaaTCySd75nxmmMXslG libMNjCmJCx4yw3yDVWpvKHezuWXm/xDUMfUAR02UhFSlRgs85BWrKj13KFcMeV+AFt6 8LXxwWP+xjY55YvwEUZ4/c63+Wb8Q4xmUIjUfvU0DfgeZkZ1vcc8XHDQ/PdT4f78WRrd MVig== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KoTelegD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id a34-v6si3460815pld.215.2018.03.28.03.56.27; Wed, 28 Mar 2018 03:56:41 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=KoTelegD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1752278AbeC1KU2 (ORCPT + 99 others); Wed, 28 Mar 2018 06:20:28 -0400 Received: from mail-io0-f182.google.com ([209.85.223.182]:40081 "EHLO mail-io0-f182.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1750735AbeC1KU0 (ORCPT ); Wed, 28 Mar 2018 06:20:26 -0400 Received: by mail-io0-f182.google.com with SMTP id e79so2897128ioi.7 for ; Wed, 28 Mar 2018 03:20:26 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:in-reply-to:message-id:references :user-agent:mime-version; bh=TglXZvTDFm93E9lOnt1LSMejYGWbtTcRIla4zKeduDQ=; b=KoTelegDcFSBlCiAnl6AuDcMtHehO1jsUuZiwkU+IPVl4Gq46iAe0ykfNGwYcabu+N eqwVRHfWOqbpiiL0gD/63YY9nUvtTQUdqer5/dQYCZmVzVKfxRO+61LxYB/wlTZdM7d4 oI9KitsmcfheypOBhCPYQJ0+yzvcwhxyOGFtQedk5a9QkbC0F6MfOnD234Asj0e8E5am nOJRVtspbX3b34AgdSx5+iwYtfgpObMgk4wsHXpHrt14Qcz9Vnv2dPFXslqA/2GadJ44 opf+cPLvhXpGH0LIa+H9TqSlse7XaV7Vj6LbPEI2O6ifFJ2lgfMzOdjHUUGszko3JBHX vLiA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:in-reply-to:message-id :references:user-agent:mime-version; bh=TglXZvTDFm93E9lOnt1LSMejYGWbtTcRIla4zKeduDQ=; b=MYUwt2s3A4V9JbmzAR02OzuHY37AeevVy/vamAGgYoZOwVjvcnimsN9zfFD35zPEUq fHCYVqtkmENlw5Z2XB0xoy2XhHy/bw3vP9h+Dc77LBK2/For8iASSM76UQSXToBARPSE tg6vW3nkaKwwU1Q6oBt9ZlzjMjug2givFt9I+ELIS/Zush7V5zUDu8UIIN3kmXlVQUxE WK7i8DLOn0UpHBP3U6sR8uwtSVM/eF0c7cVlE6zPRmVoytLhQJRq5IqLV9QJJ5QmJm6f oriUQMrUi298FzD6zB0THlNsNEBKPYsCcXwtReh+eIbz21taYJSr77sPKlS3h8XLGN2p IF5Q== X-Gm-Message-State: AElRT7EN+OI5yJqSPTkcF5YpcS0kiOc9GZA2eRcSJ5s1RVl8J4F+ynho F8aQXc7Alya6Vb7QBkWrY+lljw== X-Received: by 10.107.57.84 with SMTP id g81mr10776195ioa.6.1522232425827; Wed, 28 Mar 2018 03:20:25 -0700 (PDT) Received: from [2620:15c:17:3:3a5:23a7:5e32:4598] ([2620:15c:17:3:3a5:23a7:5e32:4598]) by smtp.gmail.com with ESMTPSA id r200sm13446ior.41.2018.03.28.03.20.23 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Wed, 28 Mar 2018 03:20:25 -0700 (PDT) Date: Wed, 28 Mar 2018 03:20:23 -0700 (PDT) From: David Rientjes X-X-Sender: rientjes@chino.kir.corp.google.com To: Laurent Dufour cc: paulmck@linux.vnet.ibm.com, peterz@infradead.org, Andrew Morton , kirill@shutemov.name, ak@linux.intel.com, mhocko@kernel.org, dave@stgolabs.net, jack@suse.cz, Matthew Wilcox , benh@kernel.crashing.org, mpe@ellerman.id.au, paulus@samba.org, Thomas Gleixner , Ingo Molnar , hpa@zytor.com, Will Deacon , Sergey Senozhatsky , Andrea Arcangeli , Alexei Starovoitov , kemi.wang@intel.com, sergey.senozhatsky.work@gmail.com, Daniel Jordan , linux-kernel@vger.kernel.org, linux-mm@kvack.org, haren@linux.vnet.ibm.com, khandual@linux.vnet.ibm.com, npiggin@gmail.com, bsingharora@gmail.com, Tim Chen , linuxppc-dev@lists.ozlabs.org, x86@kernel.org Subject: Re: [PATCH v9 06/24] mm: make pte_unmap_same compatible with SPF In-Reply-To: Message-ID: References: <1520963994-28477-1-git-send-email-ldufour@linux.vnet.ibm.com> <1520963994-28477-7-git-send-email-ldufour@linux.vnet.ibm.com> User-Agent: Alpine 2.20 (DEB 67 2015-01-07) MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Wed, 28 Mar 2018, Laurent Dufour wrote: > >> @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf) > >> int exclusive = 0; > >> int ret = 0; > > > > Initialization is now unneeded. > > I'm sorry, what "initialization" are you talking about here ? > The initialization of the ret variable. @@ -2913,7 +2921,8 @@ int do_swap_page(struct vm_fault *vmf) int exclusive = 0; int ret = 0; - if (!pte_unmap_same(vma->vm_mm, vmf->pmd, vmf->pte, vmf->orig_pte)) + ret = pte_unmap_same(vmf); + if (ret) goto out; entry = pte_to_swp_entry(vmf->orig_pte); "ret" is immediately set to the return value of pte_unmap_same(), so there is no need to initialize it to 0.