Received: by 2002:ac0:a591:0:0:0:0:0 with SMTP id m17-v6csp1448550imm; Thu, 5 Jul 2018 23:45:46 -0700 (PDT) X-Google-Smtp-Source: AAOMgpdy6c2HWZc0aJXJZ59iDTYYxNwmigvsz+smL4zXnsAaq/1CtCU+2uJFmwUQojKuxClhIvuK X-Received: by 2002:a62:ac12:: with SMTP id v18-v6mr9285102pfe.126.1530859546451; Thu, 05 Jul 2018 23:45:46 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1530859546; cv=none; d=google.com; s=arc-20160816; b=P5ROR2rrRr5X8Sw5BYzPFoQwhOa3Qh59vY1xS4xxtB3AWqScfdOBVeh3pQuWg147dS AYg6PZYLM3ZRKBhDWDhSIgDkbiW4qhsn1ZQupeF0MjIJiEIZ54slmNDJgE+VQUJRNdjL aHBi5w08VYgiqGCy5QO1Z+dzk+tl3Zx9qYr0POUtjXesblBv0WUQENpFgGoB1pAa8fGb /hdZtx1wqr1q6zVeGB6tx2hnyQOeBx74Wk+E1GbpLh+MNGEad6Q3VNJQdZaWT2L6DeSL 0KEYGSL8BzmicPMqDRdvg/aiLEg/qT/ATGX9TJdbih5ZwmWTser6nz3O/JFKDHsnsdcO yhQw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :references:in-reply-to:mime-version:dkim-signature :arc-authentication-results; bh=GWpCCjCrTnR7bFQik/iBBenF0bTw2/n/3ZimemmeXZk=; b=dHgMwmF2uj6KWxbYij+JfxFm543jYCkGy52D+7yt68cmYzlFSydD5n+93cxOsLXNDZ rGFVT+1dAcOYOGrzt7+YuN6tOAtK//vPENofKmIEhnOMkE8yDFTVPnYQLcHg5brmhnUJ zuxuq1N8zCSalDzF5xzOQzqRyQS1stESvuq97BYSNEnX+NTzJQgWzYW7nm4+xMkBOZTJ vS+8AagkJPKvuCKZQYpKo28UhSJqK476CyW3foyRxAKtqBZQy/2vazpWDW8AaxlKB3mE De580Uxk30M7jZX6uHSG8Uts0NKLZqhBp0ybfFbEP4/8tghnpacp/bqz2HYfH9QtRukO qG+A== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=NZ5+jcgs; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id u7-v6si6833424pgr.593.2018.07.05.23.45.30; Thu, 05 Jul 2018 23:45:46 -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=@gmail.com header.s=20161025 header.b=NZ5+jcgs; 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=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753667AbeGFGou (ORCPT + 99 others); Fri, 6 Jul 2018 02:44:50 -0400 Received: from mail-lj1-f193.google.com ([209.85.208.193]:40298 "EHLO mail-lj1-f193.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753575AbeGFGot (ORCPT ); Fri, 6 Jul 2018 02:44:49 -0400 Received: by mail-lj1-f193.google.com with SMTP id a6-v6so8372716ljj.7 for ; Thu, 05 Jul 2018 23:44:48 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=GWpCCjCrTnR7bFQik/iBBenF0bTw2/n/3ZimemmeXZk=; b=NZ5+jcgslYYUpK/U9X5L4cX0dDSfJhZDxP2XRZWK7ng33MSAEAY/HiBDGxtBLxInAw WmoaKnjCPG7mx7uIGKdkYpTP7kjEZG135YvA9NvFdHjX1Vl9lWaNbYulhJMMvnCauKTF Drn58QuoJoY0ClP+ZixUce4EtOX+Fg4SNucLUe2FYI/4DaZA35i7Uw2OXfBW/hXCiOfy KxdFiptcV6Et5dC51iHv442mRXfA0B5Yc6tGESblA3r74vcfW2/bMoN7/OhbzU4TttN2 S3qBiqh+rGXd6ITgJuFYux4cPG3WsF4X6AGIsfctjtpZICO0jDsFKxRiHNcyoyIfIf07 eSUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=GWpCCjCrTnR7bFQik/iBBenF0bTw2/n/3ZimemmeXZk=; b=AeZkh2x7yanmaq0SI+3dpTMWEILza/MkjEtFxQUOFmh0mcYKT6JtoPoXTwK1OQUasv +/g2IqbhQ/psTKaZycq/OqU934/DEEWoOs7aTjz9L8H/cLF4g06i1wauo9k0AUnHTF0i g+s8af3OabRdYJz8VIy8jSUBA4vhA++SOEkhFmGZlZg1FSWq5RPxt1DHKeaLBLn20K0q vlf0jzZA/bZOjxV369oZZ8PWJuWQMsfbpY7ACrPoKZ6jIroUA5H7SJKh/8LH29mEl/Q0 /y7YtD7Xq0SkplzEYyzDrHxX60Db3+PFiXOtUMGgmGx04f3NSM/n9c8gVij8RcoVSkM8 QLDQ== X-Gm-Message-State: APt69E3IAEo2KwbfTb4uX09t3lzHFsrU/91rFxF6kKGNlaJ9xHtckV8j wUzim8X7kN98FLVn/qKbgdYuUOeaWpWD1ePI9D8= X-Received: by 2002:a2e:2d11:: with SMTP id t17-v6mr1562181ljt.145.1530859487749; Thu, 05 Jul 2018 23:44:47 -0700 (PDT) MIME-Version: 1.0 Received: by 2002:a19:2b14:0:0:0:0:0 with HTTP; Thu, 5 Jul 2018 23:44:46 -0700 (PDT) In-Reply-To: <20180628184240.GA17183@jordon-HP-15-Notebook-PC> References: <20180628184240.GA17183@jordon-HP-15-Notebook-PC> From: Souptick Joarder Date: Fri, 6 Jul 2018 12:14:46 +0530 Message-ID: Subject: Re: [PATCH] orangefs: Adding new return type vm_fault_t To: Matthew Wilcox , hubcap@omnibond.com, martin@omnibond.com Cc: devel@lists.orangefs.org, linux-kernel@vger.kernel.org Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Fri, Jun 29, 2018 at 12:12 AM, Souptick Joarder wrote: > Use new return type vm_fault_t for fault handler. 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. > > See the following > commit 1c8f422059ae ("mm: change return type to vm_fault_t") > > Fixed checkpatch.pl warning. > > Signed-off-by: Souptick Joarder > --- > fs/orangefs/file.c | 19 ++++++++++--------- > 1 file changed, 10 insertions(+), 9 deletions(-) > > diff --git a/fs/orangefs/file.c b/fs/orangefs/file.c > index db0b521..a5a2fe7 100644 > --- a/fs/orangefs/file.c > +++ b/fs/orangefs/file.c > @@ -528,18 +528,19 @@ static long orangefs_ioctl(struct file *file, unsigned int cmd, unsigned long ar > return ret; > } > > -static int orangefs_fault(struct vm_fault *vmf) > +static vm_fault_t orangefs_fault(struct vm_fault *vmf) > { > struct file *file = vmf->vma->vm_file; > - int rc; > - rc = orangefs_inode_getattr(file->f_mapping->host, 0, 1, > + int ret; > + > + ret = orangefs_inode_getattr(file->f_mapping->host, 0, 1, > STATX_SIZE); > - if (rc == -ESTALE) > - rc = -EIO; > - if (rc) { > - gossip_err("%s: orangefs_inode_getattr failed, " > - "rc:%d:.\n", __func__, rc); > - return rc; > + if (ret == -ESTALE) > + ret = -EIO; > + if (ret) { > + gossip_err("%s: orangefs_inode_getattr failed, ret:%d:.\n", > + __func__, ret); > + return VM_FAULT_SIGBUS; > } > return filemap_fault(vmf); > } > -- > 1.9.1 > Any comment for this patch ?