From patchwork Fri May 11 18:06:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Souptick Joarder X-Patchwork-Id: 10394803 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id ED08C60153 for ; Fri, 11 May 2018 18:04:48 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id DE8DB28F86 for ; Fri, 11 May 2018 18:04:48 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DCB6C28F9D; Fri, 11 May 2018 18:04:48 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-3.0 required=2.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, MAILING_LIST_MULTI, RCVD_IN_DNSWL_NONE autolearn=unavailable version=3.3.1 Received: from kanga.kvack.org (kanga.kvack.org [205.233.56.17]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 5967728F88 for ; Fri, 11 May 2018 18:04:37 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 75FBA6B0677; Fri, 11 May 2018 14:04:35 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 710266B0678; Fri, 11 May 2018 14:04:35 -0400 (EDT) X-Original-To: int-list-linux-mm@kvack.org X-Delivered-To: int-list-linux-mm@kvack.org Received: by kanga.kvack.org (Postfix, from userid 63042) id 5D90A6B0679; Fri, 11 May 2018 14:04:35 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f197.google.com (mail-pf0-f197.google.com [209.85.192.197]) by kanga.kvack.org (Postfix) with ESMTP id 1A25A6B0677 for ; Fri, 11 May 2018 14:04:35 -0400 (EDT) Received: by mail-pf0-f197.google.com with SMTP id x23-v6so3320746pfm.7 for ; Fri, 11 May 2018 11:04:35 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:dkim-signature:date:from:to:cc:subject :message-id:mime-version:content-disposition:user-agent; bh=J6XHDFGEhJisf4M0XBlgF8tgRqmZY844YcKwf97B87Y=; b=sRajcC0FEMnbZFLDTsbkE3fZ9Uxe0yTOpCWBpqqyU4BlvxOTqYi3IdzmmhxLXGTUza Q7BQq1hGOyIDPWIldXRy2xr1I7mNVqALdTJFpM+3VOTBFUPYyyTn+rWb5YAlZ1k8TDW9 z/8r8LSPF0gnPveXgvLZhbzpa+DGZEkRkyAKZ9u69jL3Y3Dc3qmGuHV9YhyjH2rfLAUW Ms194vrsnd94bQpjt7DzdslhoHGR7jIk8gwWXWc5Cs20DYZWHyc11hkQHTbb+Bf7pwLZ dazQ/Me8mB1XxhUwuXuvbV4gYs1+jK67DYir+ygD3FG7H6B6oHwRD8TzYb41ndVIyF64 O/1g== X-Gm-Message-State: ALKqPwcOtiZSCQMtqvCZWFbimUK828eQDO8pBMpRXuRPDqhFXtOu0WVj YOaBCI6ePzyueAXiM0Qh2By2trZwOWmngn3iCPeWnAgARLOQmR4byCpLHcLHONOc7PK7g/TTvCB cHBY1AmQY4COqHuMDMtNjXz/4XiEFWCQPiJwKb9utnx3qT6ZTZn4KtuNwumyQRHbIqTIrqU08Ix AIsNdu4ipge0gp7VTz2Ce1HkRmwYJD8Pwdi3EW/Owh7fjXXPhCXPHnDt0Z8y3xJMITVoxK3A9DP 0Z/SuY2MFtJ2+xlaV9gvkpy9k9ebY4q4q+JFZJkIC1pqh3oQA1wGTPkzNjlAH3wURquptah7E16 9MAmZnI+4vEXrRQqY7lfI6TCGJV1rPSslysja2+48vhJLmHmnsbhZT5ExHJgubH72lEt0QfKTsm A X-Received: by 2002:a17:902:5709:: with SMTP id k9-v6mr6273283pli.165.1526061874767; Fri, 11 May 2018 11:04:34 -0700 (PDT) X-Received: by 2002:a17:902:5709:: with SMTP id k9-v6mr6273238pli.165.1526061873648; Fri, 11 May 2018 11:04:33 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526061873; cv=none; d=google.com; s=arc-20160816; b=z3JYUEG5RU43WK9dgX4TZ6tko5RO8CYu/hhnFGzLRRitQkGFk3f9ZF4xWZShK/S66P unfOtMiJHlASVBWzyfIn/poqpONdLb6Qb8AGVXyQkwb/boZkzYKV9dyunZAPkffdA6kA 5Ca+uFrk2MmZYlglwresslvOxMjtHLzIGkoDtiqcjYDbHWe5yBP3OccvzE50L4LxIasv lDeZZeeSD6y2PJlqbVZBJt95ht/S+RaleutczBlGC/ojNLCiVWv3imqLqFo+vDT8DIjQ Judmh8mX4KRBUMhg6fnafid0Zfz/1DxFYjRxX3+LuyNRinZANw4g3VAKQZmY03N1ouYM V7/g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=user-agent:content-disposition:mime-version:message-id:subject:cc :to:from:date:dkim-signature:arc-authentication-results; bh=J6XHDFGEhJisf4M0XBlgF8tgRqmZY844YcKwf97B87Y=; b=lpJ9QjZPcbNYA/kcHgXNsxHmM7CD2VWkpkT+m8QCJCnWX+gztRsiBTQ80avCLAGvZe 6rW8dSmzCwsTnsNLGbcw3GvV2xQxxFypM79Zes/v/uYZ46DDStsi58dweFmFhRk8RpRK TbTyQh7ucJktAPiv0qOrK/QHqFg7IPXsxdxohQLp8FMrFAcg0QOPfk62D3A1Av/tBfa3 SoAKH/83b9WDYsTIz04nSPb/txlTKaQwcq002VgOH6uYgeG6P889JNDEUMto59bIVE9I xxEPyW4ASKRpuVhbVyTJ7oc8GxZThvm1uXKpVzOwBkqUQ9jv86g8cjvfdEK/ahhYQiM0 tAnA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d4Pt4njl; spf=pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: from mail-sor-f65.google.com (mail-sor-f65.google.com. [209.85.220.65]) by mx.google.com with SMTPS id k24-v6sor1165567pff.93.2018.05.11.11.04.33 for (Google Transport Security); Fri, 11 May 2018 11:04:33 -0700 (PDT) Received-SPF: pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) client-ip=209.85.220.65; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=d4Pt4njl; spf=pass (google.com: domain of jrdr.linux@gmail.com designates 209.85.220.65 as permitted sender) smtp.mailfrom=jrdr.linux@gmail.com; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=date:from:to:cc:subject:message-id:mime-version:content-disposition :user-agent; bh=J6XHDFGEhJisf4M0XBlgF8tgRqmZY844YcKwf97B87Y=; b=d4Pt4njl+YXNi9alaCz3I623WW6kwIWzdrNVErQu+37XwT39KooMRcYHPd/JkEuIit et+JrobQCfsDsR27NJPAJ0AZsDd5EssQ2ZCkmA3gmg+y8E2TkGTVSoDYAt2cRLgzYtFo cKVHGdAEEwkwD/mhiYozjz7yzEYsFc+WFc31b8ftVv6DVGbNfa6PGJUVftHFD3uZr9s8 TaFVJNDfZHj9xAxN9a0nOezTD0zScdVjIawP21PJYMT6i4Vu5nZl4mTfMUUacIFmy7uA +idhis97IPQYJ5yL5n6hO/kmEd1DSXmn83CrTIGz5FEVw3Tnla/9PFsBhdjAPc4ZMWS2 DWcg== X-Google-Smtp-Source: AB8JxZoIRKxlV/0zgZNkWPlSobbjfDtZrYorhLpy3XDK08PpeHRVakbT8ks0WKdt2J11DATnd1ombg== X-Received: by 2002:a62:d508:: with SMTP id d8-v6mr6382615pfg.234.1526061873101; Fri, 11 May 2018 11:04:33 -0700 (PDT) Received: from jordon-HP-15-Notebook-PC ([183.82.18.121]) by smtp.gmail.com with ESMTPSA id p71-v6sm11497326pfl.170.2018.05.11.11.04.30 (version=TLS1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Fri, 11 May 2018 11:04:31 -0700 (PDT) Date: Fri, 11 May 2018 23:36:39 +0530 From: Souptick Joarder To: akpm@linux-foundation.org, mhocko@suse.com, hughd@google.com, dan.j.williams@intel.com, rientjes@google.com, mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com, aneesh.kumar@linux.vnet.ibm.com Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org, willy@infradead.org Subject: [PATCH v2] mm: Change return type to vm_fault_t Message-ID: <20180511180639.GA1792@jordon-HP-15-Notebook-PC> MIME-Version: 1.0 Content-Disposition: inline User-Agent: Mutt/1.5.21 (2010-09-15) X-Bogosity: Ham, tests=bogofilter, spamicity=0.000000, version=1.2.4 Sender: owner-linux-mm@kvack.org Precedence: bulk X-Loop: owner-majordomo@kvack.org List-ID: X-Virus-Scanned: ClamAV using ClamSMTP Use new return type vm_fault_t for fault handler in struct vm_operations_struct. For now, this is just documenting that the function returns a VM_FAULT value rather than an errno. Once all instances are converted, vm_fault_t will become a distinct type. commit 1c8f422059ae ("mm: change return type to vm_fault_t") Signed-off-by: Souptick Joarder Reviewed-by: Matthew Wilcox --- v2: Updated the change log mm/hugetlb.c | 2 +- mm/mmap.c | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/mm/hugetlb.c b/mm/hugetlb.c index 7c204e3..acb432a 100644 --- a/mm/hugetlb.c +++ b/mm/hugetlb.c @@ -3158,7 +3158,7 @@ static int hugetlb_vm_op_split(struct vm_area_struct *vma, unsigned long addr) * hugegpage VMA. do_page_fault() is supposed to trap this, so BUG is we get * this far. */ -static int hugetlb_vm_op_fault(struct vm_fault *vmf) +static vm_fault_t hugetlb_vm_op_fault(struct vm_fault *vmf) { BUG(); return 0; diff --git a/mm/mmap.c b/mm/mmap.c index 9efdc021..ac41b34 100644 --- a/mm/mmap.c +++ b/mm/mmap.c @@ -3208,7 +3208,7 @@ void vm_stat_account(struct mm_struct *mm, vm_flags_t flags, long npages) mm->data_vm += npages; } -static int special_mapping_fault(struct vm_fault *vmf); +static vm_fault_t special_mapping_fault(struct vm_fault *vmf); /* * Having a close hook prevents vma merging regardless of flags. @@ -3247,7 +3247,7 @@ static int special_mapping_mremap(struct vm_area_struct *new_vma) .fault = special_mapping_fault, }; -static int special_mapping_fault(struct vm_fault *vmf) +static vm_fault_t special_mapping_fault(struct vm_fault *vmf) { struct vm_area_struct *vma = vmf->vma; pgoff_t pgoff;