From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: 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 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> Sender: linux-fsdevel-owner@vger.kernel.org List-ID: 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?