Received: by 2002:ac0:a5a7:0:0:0:0:0 with SMTP id m36-v6csp692546imm; Mon, 9 Jul 2018 08:58:07 -0700 (PDT) X-Google-Smtp-Source: AAOMgpcYza6Dk//hbxQWwmV05sQ8xpy2501CtWDoOWPtOUqHSwtSmGQ2HIzFALgGlR4uycTdDWVY X-Received: by 2002:a63:115e:: with SMTP id 30-v6mr16948880pgr.53.1531151887299; Mon, 09 Jul 2018 08:58:07 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1531151887; cv=none; d=google.com; s=arc-20160816; b=p/FIGAlBaV0PQx5bLIqMP4EmZqVUvayuO1CFVe+5dSsv5+16X+EKinnNVbtmwubYtb 2kK//VWM2DjbOtBzvrHNbWJWQJ3QcnlhygWD8it6Cdqv1RrNZBH8DY4kdlf9NRiry4zS Voz3fJPywjSqor7TJC7lLmxxhuIkq2mPttSG+VkkdiWLF6joea8dmTdMlfn2h58NyCB5 UlyswJMpAcLg5g5bJixE3c4d0nD+BnfzhxRpADoM6RQwBXrbh0BNk5ZOBtUOAtcQTqiH VvCrJRE325sBHWNm/T3OM/d5u49YMnjSnnA9coHNPKnj8GNWehGib9LQVCRCl9AyHDgK pqkQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:arc-authentication-results; bh=Es/+hPro7DuPVzZX7LnQt5bXiTRNggwM6NC0na6o5b0=; b=Qjw6BFkovGBAWOrhvugieCwZJG6GZzzDUCunk2mBsRuBOf1/Xml5rsBlE6Woq4JtLj ZXX1XCf/UHr/yoGIwkYu/nYHaBU7mP1jIZGD1QjOElXMne5Kt4lp/2DMybEnEJi6CRcv uXFPl92M0f8xRSabs8s31YMSSnTf+oiiO4wmYmKuUCgfBHUEF+ozU1SPoIagqESB74E1 +mDo5NJx+idB5PfFdqgajv+G6wf8fbFVsxB4ZJ5YbNrAmYPO3gQoKGPparBgxvXTOvtd UTW8AZWPIBQKELggZRGZA2WdFj/6L3DI1vET5WWMEPS/eAAZBvol8B3D1L5V1UXq3UND wWZQ== ARC-Authentication-Results: i=1; mx.google.com; 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 Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t9-v6si288795pgo.42.2018.07.09.08.57.49; Mon, 09 Jul 2018 08:58:07 -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; 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 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933519AbeGIP4Y (ORCPT + 99 others); Mon, 9 Jul 2018 11:56:24 -0400 Received: from zeniv.linux.org.uk ([195.92.253.2]:54564 "EHLO ZenIV.linux.org.uk" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933357AbeGIP4W (ORCPT ); Mon, 9 Jul 2018 11:56:22 -0400 Received: from viro by ZenIV.linux.org.uk with local (Exim 4.87 #1 (Red Hat Linux)) id 1fcYWR-0007LD-60; Mon, 09 Jul 2018 15:56:19 +0000 Date: Mon, 9 Jul 2018 16:56:19 +0100 From: Al Viro To: David Howells Cc: Eric Biggers , linux-fsdevel@vger.kernel.org, linux-kernel@vger.kernel.org Subject: Re: [PATCH vfs/for-next 00/18] fs_context fixes Message-ID: <20180709155618.GH30522@ZenIV.linux.org.uk> References: <20180708234630.GB700@sol.localdomain> <20180708210154.10423-1-ebiggers3@gmail.com> <31355.1531150319@warthog.procyon.org.uk> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <31355.1531150319@warthog.procyon.org.uk> User-Agent: Mutt/1.9.1 (2017-09-22) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Jul 09, 2018 at 04:31:59PM +0100, David Howells wrote: > -int __mnt_is_readonly(struct vfsmount *mnt) > +bool __mnt_is_readonly(struct vfsmount *mnt) > { > if (mnt->mnt_flags & MNT_READONLY) > - return 1; > + return true; > if (sb_rdonly(mnt->mnt_sb)) > - return 1; > - return 0; > + return true; > + return false; Egads... *If* you go for bool here, why not return (mnt->mnt_flags & MNT_READONLY) || sb_rdonly(mnt->mnt_sb); and be done with that?