| To: | Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 9/9] Clean up open coded inode dirty checks |
| From: | Joe Perches <joe@xxxxxxxxxxx> |
| Date: | Fri, 23 Nov 2007 11:47:31 -0800 |
| Cc: | Christoph Hellwig <hch@xxxxxxxxxxxxx>, David Chinner <dgc@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx> |
| In-reply-to: | <Pine.LNX.4.64.0711231914300.12552@xxxxxxxxxxxxxxxxxxxxxxxxx> |
| References: | <20071122004422.GO114266761@xxxxxxx> <20071123180239.GA13229@xxxxxxxxxxxxx> <Pine.LNX.4.64.0711231914300.12552@xxxxxxxxxxxxxxxxxxxxxxxxx> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
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;
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Jan Engelhardt |
|---|---|
| Next by Date: | Re: [PATCH 2/9]: Reduce Log I/O latency, Matt Mackall |
| Previous by Thread: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Jan Engelhardt |
| Next by Thread: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Jan Engelhardt |
| Indexes: | [Date] [Thread] [Top] [All Lists] |