From patchwork Wed May 16 05:43:43 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christoph Hellwig X-Patchwork-Id: 10402643 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 459FF601D2 for ; Wed, 16 May 2018 05:44:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 34DB028733 for ; Wed, 16 May 2018 05:44:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 28F3D28761; Wed, 16 May 2018 05:44:59 +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=-2.8 required=2.0 tests=BAYES_00,DKIM_SIGNED, MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE,T_DKIM_INVALID autolearn=ham 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 B005928733 for ; Wed, 16 May 2018 05:44:58 +0000 (UTC) Received: by kanga.kvack.org (Postfix) id 11E0B6B02F3; Wed, 16 May 2018 01:44:53 -0400 (EDT) Delivered-To: linux-mm-outgoing@kvack.org Received: by kanga.kvack.org (Postfix, from userid 40) id 0A5406B02F5; Wed, 16 May 2018 01:44:53 -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 CB2DB6B02F2; Wed, 16 May 2018 01:44:52 -0400 (EDT) X-Original-To: linux-mm@kvack.org X-Delivered-To: linux-mm@kvack.org Received: from mail-pf0-f198.google.com (mail-pf0-f198.google.com [209.85.192.198]) by kanga.kvack.org (Postfix) with ESMTP id 7F6E56B02F3 for ; Wed, 16 May 2018 01:44:52 -0400 (EDT) Received: by mail-pf0-f198.google.com with SMTP id e7-v6so1882960pfi.8 for ; Tue, 15 May 2018 22:44:52 -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:from:to:cc:subject:date :message-id:in-reply-to:references; bh=m/+6PFuddEZ35FApa3uEmzX9PU/IAXRO7d2x+Z4BrbY=; b=nhgttPPn4u9lnL46YXdWRborkSMETHgfpVWblpIWPiXjvPwwAj7y3SCm/3jEDiOTSY U3sUZfqwOeeiKb52Po3Z6iorsw86FTPuF7HNZrQPR8l4yMnD1x3B3YpE8NQtUGj4l8KG jCPoTVzQ5RNhNoDIAErQvsrjLdVFUTv5Ct+kQmNM3pIdGkW9X6JUctSZjxmMJFhGd7H/ hCTSHuAc6FsACqMIZ9T32gl4ij0yzaVdP/qu5Pqrj52Y0Ru2ombMW1VAopfKHKTuMwEH VCMgxBnyLWGdR7iL+zR9Yu9auU2nSyuaVDbyk/yJqrVtM9zCPqPnQvlCYYeborfwHbSm blmQ== X-Gm-Message-State: ALKqPwe/gwTkIp7L57IhZ0wEbmp4nirDodkKE2h2SKPURVckUyMFnc0O rCO6cL7acqlxPB4Z7DJIfGVSwBLE0eHVUX4EFFzE9dEEDPlzGFucARjeWZajby4QjRx0JbAYv61 hF6bDDcGaqpBzVekybGaj+9JexEbw8DAaM6qHPxIh+fu30L2QFtk5SADLZtUf6oM= X-Received: by 2002:a17:902:8218:: with SMTP id x24-v6mr17568293pln.57.1526449492199; Tue, 15 May 2018 22:44:52 -0700 (PDT) X-Google-Smtp-Source: AB8JxZqB6DQQHdvidUaIFFER+rWVnDLQCe/Tbkc54rrYKXicgjX9/1nWKtXIqCaU16XuNXlCNrar X-Received: by 2002:a17:902:8218:: with SMTP id x24-v6mr17568258pln.57.1526449491529; Tue, 15 May 2018 22:44:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1526449491; cv=none; d=google.com; s=arc-20160816; b=ssTI4J0l4V9UCSrVrH1jfTzQeWGLhibq2ECbsLLT6Eon5OEOiVGSZTwWcke5T4lRIF rO/mUTv44/rqEMidGCa99oNwqiZ2eiIhfdpk/BmT8YKr8mt7wvmPdfHhRLx06Rag0Oqp cqzM0YJTlMpGt61RKckkSy/AmEcW5A0X01OuiOqO376fju1oagw+qp7y+Il+LYYlNFOT wnBJun79tPFafpLT9roLRo6MTFRaA1+DZJmpwPk5bZujgF1JZwMqzyPVuwe6ojhKP2jG m8iiYGIQLRzuLZAtKBtfRryx6/m9AbyohmtYPF/NYsXRlvnQzIfvUT4sjLiKWYO1cdK5 Y/Xg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature:arc-authentication-results; bh=m/+6PFuddEZ35FApa3uEmzX9PU/IAXRO7d2x+Z4BrbY=; b=KCk1k9h5VrY2vHQs6PxhIyjJZEToCeXRWh9hewyQh2X0dUQGDmfEhFcpTJQfju8b2w RdAuQueSbGllnn820f6+BRoPvfDUfUOKmfqcjnbO+KfG9t8aGn+RkywfrmtoDzgFXQMm QEZk7OyfESV/Lni9wl123pLgvQ5tSl6x18FZnugqnN1jBX7dx2D2Lnh8edu4Gl+04T04 wgmfggwixDh8GLQio6YS8hZIudo/3q2RnENVzcooJ7VsdNI60xzd8A4Q32bSJwSQgxLA dK4BWgEZw8A0NSltsbB5BKkpO8jXSDPQo/MQgnAEU7QMXz3kzdG3XjZJliTY13U3+gVg fqpw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=MDrXcGRr; spf=pass (google.com: best guess record for domain of batv+8c5add14d4fec8f33fc9+5379+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+8c5add14d4fec8f33fc9+5379+infradead.org+hch@bombadil.srs.infradead.org Received: from bombadil.infradead.org (bombadil.infradead.org. [2607:7c80:54:e::133]) by mx.google.com with ESMTPS id d132-v6si1488695pgc.253.2018.05.15.22.44.51 for (version=TLS1_2 cipher=ECDHE-RSA-CHACHA20-POLY1305 bits=256/256); Tue, 15 May 2018 22:44:51 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of batv+8c5add14d4fec8f33fc9+5379+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) client-ip=2607:7c80:54:e::133; Authentication-Results: mx.google.com; dkim=pass header.i=@infradead.org header.s=bombadil.20170209 header.b=MDrXcGRr; spf=pass (google.com: best guess record for domain of batv+8c5add14d4fec8f33fc9+5379+infradead.org+hch@bombadil.srs.infradead.org designates 2607:7c80:54:e::133 as permitted sender) smtp.mailfrom=BATV+8c5add14d4fec8f33fc9+5379+infradead.org+hch@bombadil.srs.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20170209; h=References:In-Reply-To:Message-Id: Date:Subject:Cc:To:From:Sender:Reply-To:MIME-Version:Content-Type: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Id: List-Help:List-Unsubscribe:List-Subscribe:List-Post:List-Owner:List-Archive; bh=m/+6PFuddEZ35FApa3uEmzX9PU/IAXRO7d2x+Z4BrbY=; b=MDrXcGRrWtg/4qlSjL7hUfTS0 RqZkr1hT28gVW4kqM2jxU+fgo4ZSXLLdtf2RDNyKF37dpblLrsfCutkBrVW1aTlABCaxsi+icxEqU PG+E2kO53RAd8gz7rGYCii4MI3A51aolJbPPN1HZy6CdxZWrl9V938G2j1Xmm9VlpeGK8vfLLYDYF fih+/dPjE01fYS8GASErgDAI1kgiPXq0c+LFC0mKzX63rTPWWYsVqYHfZaJ7qDyHZA0IHqrjREE1N 4lIFosSeorMBYM5C/AJZ1HsOSdQNxzr5A0JqHikto5gp8/XC0JYztTjQjBg2fPVb03WYruDSix2Am Hpy9RIJdg==; Received: from [93.83.86.253] (helo=localhost) by bombadil.infradead.org with esmtpsa (Exim 4.90_1 #2 (Red Hat Linux)) id 1fIpEc-00089i-9Y; Wed, 16 May 2018 05:44:22 +0000 From: Christoph Hellwig To: Souptick Joarder , Matthew Wilcox Cc: linux-fsdevel@vger.kernel.org, linux-mm@kvack.org, linux-kernel@vger.kernel.org, devel@lists.orangefs.org, ceph-devel@vger.kernel.org, linux-btrfs@vger.kernel.org, linux-ext4@vger.kernel.org, ocfs2-devel@oss.oracle.com, linux-mtd@lists.infradead.org, dri-devel@lists.freedesktop.org, lustre-devel@lists.lustre.org, linux-arm-kernel@lists.infradead.org, linux-s390@vger.kernel.org Subject: [PATCH 09/14] ubifs: separate errno from VM_FAULT_* values Date: Wed, 16 May 2018 07:43:43 +0200 Message-Id: <20180516054348.15950-10-hch@lst.de> X-Mailer: git-send-email 2.17.0 In-Reply-To: <20180516054348.15950-1-hch@lst.de> References: <20180516054348.15950-1-hch@lst.de> X-SRS-Rewrite: SMTP reverse-path rewritten from by bombadil.infradead.org. See http://www.infradead.org/rpr.html 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 Signed-off-by: Christoph Hellwig --- fs/ubifs/file.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/fs/ubifs/file.c b/fs/ubifs/file.c index 1acb2ff505e6..7c1a2e1c3de5 100644 --- a/fs/ubifs/file.c +++ b/fs/ubifs/file.c @@ -1513,7 +1513,7 @@ static int ubifs_releasepage(struct page *page, gfp_t unused_gfp_flags) * mmap()d file has taken write protection fault and is being made writable. * UBIFS must ensure page is budgeted for. */ -static int ubifs_vm_page_mkwrite(struct vm_fault *vmf) +static vm_fault_t ubifs_vm_page_mkwrite(struct vm_fault *vmf) { struct page *page = vmf->page; struct inode *inode = file_inode(vmf->vma->vm_file); @@ -1521,6 +1521,7 @@ static int ubifs_vm_page_mkwrite(struct vm_fault *vmf) struct timespec now = current_time(inode); struct ubifs_budget_req req = { .new_page = 1 }; int err, update_time; + vm_fault_t ret = 0; dbg_gen("ino %lu, pg %lu, i_size %lld", inode->i_ino, page->index, i_size_read(inode)); @@ -1601,8 +1602,8 @@ static int ubifs_vm_page_mkwrite(struct vm_fault *vmf) unlock_page(page); ubifs_release_budget(c, &req); if (err) - err = VM_FAULT_SIGBUS; - return err; + ret = VM_FAULT_SIGBUS; + return ret; } static const struct vm_operations_struct ubifs_file_vm_ops = {