From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.3 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS, USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id D270BC433DB for ; Mon, 11 Jan 2021 10:54:26 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 985C422510 for ; Mon, 11 Jan 2021 10:54:26 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729574AbhAKKy0 (ORCPT ); Mon, 11 Jan 2021 05:54:26 -0500 Received: from verein.lst.de ([213.95.11.211]:50184 "EHLO verein.lst.de" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729401AbhAKKyZ (ORCPT ); Mon, 11 Jan 2021 05:54:25 -0500 Received: by verein.lst.de (Postfix, from userid 2407) id 2323F67373; Mon, 11 Jan 2021 11:53:43 +0100 (CET) Date: Mon, 11 Jan 2021 11:53:42 +0100 From: Christoph Hellwig To: Eric Biggers Cc: linux-fsdevel@vger.kernel.org, linux-xfs@vger.kernel.org, linux-ext4@vger.kernel.org, linux-f2fs-devel@lists.sourceforge.net, Theodore Ts'o , Christoph Hellwig Subject: Re: [PATCH v2 11/12] ext4: simplify i_state checks in __ext4_update_other_inode_time() Message-ID: <20210111105342.GE2502@lst.de> References: <20210109075903.208222-1-ebiggers@kernel.org> <20210109075903.208222-12-ebiggers@kernel.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20210109075903.208222-12-ebiggers@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) Precedence: bulk List-ID: X-Mailing-List: linux-fsdevel@vger.kernel.org On Fri, Jan 08, 2021 at 11:59:02PM -0800, Eric Biggers wrote: > if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > - I_DIRTY_INODE)) || > - ((inode->i_state & I_DIRTY_TIME) == 0)) > + I_DIRTY_TIME)) != I_DIRTY_TIME) > return; > > spin_lock(&inode->i_lock); > - if (((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > - I_DIRTY_INODE)) == 0) && > - (inode->i_state & I_DIRTY_TIME)) { > + if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > + I_DIRTY_TIME)) == I_DIRTY_TIME) { I think a descriptively named inline helper in fs.h would really improve this.. From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.1 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,SPF_HELO_NONE, SPF_PASS,USER_AGENT_SANE_1 autolearn=no autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id 9ACD4C433DB for ; Mon, 11 Jan 2021 10:54:08 +0000 (UTC) Received: from lists.sourceforge.net (lists.sourceforge.net [216.105.38.7]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 4A21F221ED; Mon, 11 Jan 2021 10:54:08 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 4A21F221ED Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=lst.de Authentication-Results: mail.kernel.org; spf=pass smtp.mailfrom=linux-f2fs-devel-bounces@lists.sourceforge.net Received: from [127.0.0.1] (helo=sfs-ml-4.v29.lw.sourceforge.com) by sfs-ml-4.v29.lw.sourceforge.com with esmtp (Exim 4.90_1) (envelope-from ) id 1kyupr-0003aV-PB; Mon, 11 Jan 2021 10:54:07 +0000 Received: from [172.30.20.202] (helo=mx.sourceforge.net) by sfs-ml-4.v29.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kyupr-0003aP-2V for linux-f2fs-devel@lists.sourceforge.net; Mon, 11 Jan 2021 10:54:07 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sourceforge.net; s=x; h=In-Reply-To:Content-Type:MIME-Version:References: Message-ID:Subject:Cc:To:From:Date:Sender:Reply-To: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=tndQR8x4jskg5bt9X3Bn3b3/vXcQTQYX2ICPpgTVyVI=; b=Dz+Y7vHkELnvfzExE8hb4gzfAn Mh/WcRe3B8hVqid2YHyVdHXPy6iqL7oto3Qzud4FXteHmEbQzFPQx0fjohKmotBjCbOYiuvRpcemM x3KbXtgKiCkHOJ+O7wcnMjZLcap5ssH5bmHx2nXJAk/Dps0XG2mq5K8LByEgdjp448As=; DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=sf.net; s=x ; h=In-Reply-To:Content-Type:MIME-Version:References:Message-ID:Subject:Cc:To :From:Date:Sender:Reply-To: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=tndQR8x4jskg5bt9X3Bn3b3/vXcQTQYX2ICPpgTVyVI=; b=ftEoVErI9CH97vmifvFjpIXGMh 410wFLPA2c5YiF7fWZ5mgmY1W17XNSGc2Lv3kgIVsSTp9tJAAzcmhlLk2+7he3QVucNEmlqrALWqN sOUvWRTV15+OKf41A5HfVXPgriZx3ZPbeRO68NwzzLrJwyK5MpV38W1+Xr5mumr3eIAA=; Received: from verein.lst.de ([213.95.11.211]) by sfi-mx-3.v28.lw.sourceforge.com with esmtps (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256) (Exim 4.92.2) id 1kyuph-000rsQ-CR for linux-f2fs-devel@lists.sourceforge.net; Mon, 11 Jan 2021 10:54:06 +0000 Received: by verein.lst.de (Postfix, from userid 2407) id 2323F67373; Mon, 11 Jan 2021 11:53:43 +0100 (CET) Date: Mon, 11 Jan 2021 11:53:42 +0100 From: Christoph Hellwig To: Eric Biggers Message-ID: <20210111105342.GE2502@lst.de> References: <20210109075903.208222-1-ebiggers@kernel.org> <20210109075903.208222-12-ebiggers@kernel.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210109075903.208222-12-ebiggers@kernel.org> User-Agent: Mutt/1.5.17 (2007-11-01) X-Headers-End: 1kyuph-000rsQ-CR Subject: Re: [f2fs-dev] [PATCH v2 11/12] ext4: simplify i_state checks in __ext4_update_other_inode_time() X-BeenThere: linux-f2fs-devel@lists.sourceforge.net X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Theodore Ts'o , linux-f2fs-devel@lists.sourceforge.net, linux-xfs@vger.kernel.org, linux-fsdevel@vger.kernel.org, linux-ext4@vger.kernel.org, Christoph Hellwig Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: linux-f2fs-devel-bounces@lists.sourceforge.net On Fri, Jan 08, 2021 at 11:59:02PM -0800, Eric Biggers wrote: > if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > - I_DIRTY_INODE)) || > - ((inode->i_state & I_DIRTY_TIME) == 0)) > + I_DIRTY_TIME)) != I_DIRTY_TIME) > return; > > spin_lock(&inode->i_lock); > - if (((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > - I_DIRTY_INODE)) == 0) && > - (inode->i_state & I_DIRTY_TIME)) { > + if ((inode->i_state & (I_FREEING | I_WILL_FREE | I_NEW | > + I_DIRTY_TIME)) == I_DIRTY_TIME) { I think a descriptively named inline helper in fs.h would really improve this.. _______________________________________________ Linux-f2fs-devel mailing list Linux-f2fs-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linux-f2fs-devel