From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mail-lf0-f72.google.com (mail-lf0-f72.google.com [209.85.215.72]) by kanga.kvack.org (Postfix) with ESMTP id 7213F6B06DA for ; Sat, 12 May 2018 02:26:38 -0400 (EDT) Received: by mail-lf0-f72.google.com with SMTP id o98-v6so2573596lfg.2 for ; Fri, 11 May 2018 23:26:38 -0700 (PDT) Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id u6-v6sor82050lfk.66.2018.05.11.23.26.37 for (Google Transport Security); Fri, 11 May 2018 23:26:37 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: References: <20180512061712.GA26660@jordon-HP-15-Notebook-PC> From: Souptick Joarder Date: Sat, 12 May 2018 11:56:36 +0530 Message-ID: Subject: Re: [PATCH v3] mm: Change return type to vm_fault_t Content-Type: text/plain; charset="UTF-8" Sender: owner-linux-mm@kvack.org List-ID: To: Joe Perches Cc: Andrew Morton , Michal Hocko , Hugh Dickins , Dan Williams , David Rientjes , mike.kravetz@oracle.com, n-horiguchi@ah.jp.nec.com, "Aneesh Kumar K.V" , Linux-MM , linux-kernel@vger.kernel.org, Matthew Wilcox On Sat, May 12, 2018 at 11:55 AM, Souptick Joarder wrote: > On Sat, May 12, 2018 at 11:50 AM, Joe Perches wrote: >> On Sat, 2018-05-12 at 11:47 +0530, Souptick Joarder wrote: >>> 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. >> >> trivia: >> >>> diff --git a/include/linux/mm_types.h b/include/linux/mm_types.h >> [] >>> @@ -627,7 +627,7 @@ struct vm_special_mapping { >>> * If non-NULL, then this is called to resolve page faults >>> * on the special mapping. If used, .pages is not checked. >>> */ >>> - int (*fault)(const struct vm_special_mapping *sm, >>> + vm_fault_t (*fault)(const struct vm_special_mapping *sm, >>> struct vm_area_struct *vma, >>> struct vm_fault *vmf); >> >> >> It'd be nicer to realign the 2nd and 3rd arguments >> on the subsequent lines. >> >> vm_fault_t (*fault)(const struct vm_special_mapping *sm, >> struct vm_area_struct *vma, >> struct vm_fault *vmf); >> > > Just now posted v3. Do you want me to send v4 again with > realignment ? Sorry, please ignore this mail.