public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Joe Perches <joe@perches.com>
To: Jan Engelhardt <jengelh@computergmbh.de>
Cc: Christoph Hellwig <hch@infradead.org>,
	David Chinner <dgc@sgi.com>, xfs-oss <xfs@oss.sgi.com>,
	lkml <linux-kernel@vger.kernel.org>
Subject: Re: [PATCH 9/9] Clean up open coded inode dirty checks
Date: Fri, 23 Nov 2007 11:47:31 -0800	[thread overview]
Message-ID: <1195847251.4930.21.camel@localhost> (raw)
In-Reply-To: <Pine.LNX.4.64.0711231914300.12552@fbirervta.pbzchgretzou.qr>

On Fri, 2007-11-23 at 19:16 +0100, Jan Engelhardt wrote:
> static inline bool xfs_inode_clean(const struct xfs_inode *ip)
> {
> 	if (ip->i_itemp == NULL)
> 		return true;
> 	if (!(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL) &&
> 	    ip->i_update_core == NULL)
> 		return true;
> 	return false;
> }

Your code changed the test.
xfs_inode.i_update_core is an unsigned char.

I believe reordering the tests to avoid a possibly
unnecessary dereference is better.

	if (ip->i_update_core)
		return false;
	if (!ip->i_itemp)
		return true;
	return ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL;



  reply	other threads:[~2007-11-23 19:47 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-11-22  0:44 [PATCH 9/9] Clean up open coded inode dirty checks David Chinner
2007-11-23 18:02 ` Christoph Hellwig
2007-11-23 18:16   ` Jan Engelhardt
2007-11-23 19:47     ` Joe Perches [this message]
2007-11-23 20:16       ` Jan Engelhardt

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1195847251.4930.21.camel@localhost \
    --to=joe@perches.com \
    --cc=dgc@sgi.com \
    --cc=hch@infradead.org \
    --cc=jengelh@computergmbh.de \
    --cc=linux-kernel@vger.kernel.org \
    --cc=xfs@oss.sgi.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox