From patchwork Fri Jun 1 23:47:52 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Andrew Morton X-Patchwork-Id: 10444433 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 5D825603D7 for ; Fri, 1 Jun 2018 23:53:01 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 4E3CB289EC for ; Fri, 1 Jun 2018 23:53:01 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 410D628A72; Fri, 1 Jun 2018 23:53:01 +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=-5.2 required=2.0 tests=BAYES_00, MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from aserp2130.oracle.com (aserp2130.oracle.com [141.146.126.79]) (using TLSv1.2 with cipher AES256-SHA256 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id D2588289EC for ; Fri, 1 Jun 2018 23:53:00 +0000 (UTC) Received: from pps.filterd (aserp2130.oracle.com [127.0.0.1]) by aserp2130.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w51NkOk6138049; Fri, 1 Jun 2018 23:48:47 GMT Received: from aserv0022.oracle.com (aserv0022.oracle.com [141.146.126.234]) by aserp2130.oracle.com with ESMTP id 2janje6efh-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=OK); Fri, 01 Jun 2018 23:48:47 +0000 Received: from oss.oracle.com (oss-old-reserved.oracle.com [137.254.22.2]) by aserv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w51NmiYS031379 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 1 Jun 2018 23:48:44 GMT Received: from localhost ([127.0.0.1] helo=lb-oss.oracle.com) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1fOtmm-0001OH-31; Fri, 01 Jun 2018 16:48:44 -0700 Received: from userv0022.oracle.com ([156.151.31.74]) by oss.oracle.com with esmtp (Exim 4.63) (envelope-from ) id 1fOtlz-0001Ik-Tk for ocfs2-devel@oss.oracle.com; Fri, 01 Jun 2018 16:47:56 -0700 Received: from userp2040.oracle.com (userp2040.oracle.com [156.151.31.90]) by userv0022.oracle.com (8.14.4/8.14.4) with ESMTP id w51NltvB006630 (version=TLSv1/SSLv3 cipher=AES256-SHA256 bits=256 verify=FAIL) for ; Fri, 1 Jun 2018 23:47:55 GMT Received: from pps.filterd (userp2040.oracle.com [127.0.0.1]) by userp2040.oracle.com (8.16.0.22/8.16.0.22) with SMTP id w51NjIqZ048059 for ; Fri, 1 Jun 2018 23:47:55 GMT Received: from mail.linuxfoundation.org (mail.linuxfoundation.org [140.211.169.12]) by userp2040.oracle.com with ESMTP id 2jba07wg36-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NO) for ; Fri, 01 Jun 2018 23:47:55 +0000 Received: from akpm3.svl.corp.google.com (unknown [104.133.9.92]) by mail.linuxfoundation.org (Postfix) with ESMTPSA id A57081342; Fri, 1 Jun 2018 23:47:53 +0000 (UTC) Date: Fri, 1 Jun 2018 16:47:52 -0700 From: Andrew Morton To: Souptick Joarder Message-Id: <20180601164752.027e4f087da1b545f15c6832@linux-foundation.org> In-Reply-To: <20180523153258.GA28451@jordon-HP-15-Notebook-PC> References: <20180523153258.GA28451@jordon-HP-15-Notebook-PC> X-Mailer: Sylpheed 3.6.0 (GTK+ 2.24.31; x86_64-pc-linux-gnu) Mime-Version: 1.0 X-CLX-Shades: MLX X-CLX-Response: 1TFkXGRkbEQpMehcbGRIRCllNF2dmchEKWUkXGnEaEBp3BhkbG3EbGBIZEBp 3BhgaBhoRClleF2hjeREKSUYXRVhLSUZPdVpYRU5fSV5DRUQZdU9LEQpDThcSYn9sQENMG2EHGF NifxN/U0dzW3BLZFBYcEgcGWNMGBEKWFwXHwQaBBsZHAdMGh8STxpPHwUbGgQbGhoEHhIEHxAbH hofGhEKXlkXeXgZBW0RCk1cFx8bGhEKTFoXaWhpQk1dEQpNThdoEQpMRhdsa2sRCkNaFxseGgQY GxsEGxwTBBsYEQpCXhcbEQpESRcfEQpCRhdgU24eQxlzZ1hGZhEKQlwXGhEKQkUXbXlaQH8eU28 fYWIRCkJOF29vZWIccgVmZl5hEQpCTBdrfH9gRRhsc2UaZBEKQmwXbhJYfXpPT29dTB8RCkJAF2 dmRhxdQxllHEhQEQpCWBdifW95AU8YGXBwexEKWlgXGBEKcGgXYElGfklSeWlmXl8QGhEKcGgXY GJmXWZvX319EkMQGhEKcGgXbxllREJlBUF6cGAQGhEKcGgXa3lyXFJlbVxgelgQGhEKcGgXZx1O BWQTUmxhX0kQGhEKcGwXZk5kXUVCbFplZEYQHRoRCnBDF2xdYEJ9Q3NebmceEBoRCm1+FxoRClh NF0sRIA== X-PDR: PASS X-Source-IP: 140.211.169.12 X-ServerName: mail.linuxfoundation.org X-Proofpoint-SPF-Result: pass X-Proofpoint-SPF-Record: v=spf1 ip4:140.211.169.12/30 ip4:198.145.29.99 include:_spf.google.com ~all X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8911 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 priorityscore=138 malwarescore=0 suspectscore=0 phishscore=0 bulkscore=0 spamscore=0 clxscore=331 lowpriorityscore=0 mlxscore=0 impostorscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806010269 X-Spam: Clean Cc: mfasheh@versity.com, ocfs2-devel@oss.oracle.com, willy@infradead.org, linux-kernel@vger.kernel.org Subject: Re: [Ocfs2-devel] [PATCH v2] fs: ocfs2: Adding new return type vm_fault_t X-BeenThere: ocfs2-devel@oss.oracle.com X-Mailman-Version: 2.1.9 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: ocfs2-devel-bounces@oss.oracle.com Errors-To: ocfs2-devel-bounces@oss.oracle.com X-Proofpoint-Virus-Version: vendor=nai engine=5900 definitions=8911 signatures=668702 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=999 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1805220000 definitions=main-1806010269 X-Virus-Scanned: ClamAV using ClamSMTP On Wed, 23 May 2018 21:02:58 +0530 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. > > Ref-> commit 1c8f422059ae ("mm: change return type to vm_fault_t") > > vmf_error() is the newly introduce inline function > in 4.18. > > Fix one checkpatch.pl warning by replacing BUG_ON() > with WARN_ON() err, no, I'll revert that part. It could be that if this assertion triggers then filesystem corruption would ensue, in which case a BUG_ON() is the appropriate handling. Such a change should be submitted separately, please. --- a/fs/ocfs2/mmap.c~fs-ocfs2-adding-new-return-type-vm_fault_t-fix +++ a/fs/ocfs2/mmap.c @@ -120,7 +120,7 @@ static vm_fault_t __ocfs2_page_mkwrite(s goto out; } err = ocfs2_write_end_nolock(mapping, pos, len, len, fsdata); - WARN_ON(err != len); + BUG_ON(err != len); ret = VM_FAULT_LOCKED; out: return ret;