[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <Pine.LNX.4.64.0711231914300.12552@fbirervta.pbzchgretzou.qr>
Date: Fri, 23 Nov 2007 19:16:08 +0100 (CET)
From: Jan Engelhardt <jengelh@...putergmbh.de>
To: Christoph Hellwig <hch@...radead.org>
cc: David Chinner <dgc@....com>, xfs-oss <xfs@....sgi.com>,
lkml <linux-kernel@...r.kernel.org>
Subject: Re: [PATCH 9/9] Clean up open coded inode dirty checks
On Nov 23 2007 18:02, Christoph Hellwig wrote:
>
>> +STATIC_INLINE int xfs_inode_clean(xfs_inode_t *ip)
>> +{
>> + return (((ip->i_itemp == NULL) ||
>> + !(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL)) &&
>> + (ip->i_update_core == 0));
>> +}
>
>Can we please get rid of this useless STATIC_INLINE junk? It's really
>hurting my eyes.
>
>As does to a lesser extent the verbose style of this
>function.
I have to disagree, but whatever.
>static inline int xfs_inode_clean(struct xfs_inode *ip)
^ ^
could be bool - and const
>{
> return (!ip->i_itemp ||
> !(ip->i_itemp->ili_format.ilf_fields & XFS_ILOG_ALL)) &&
> !ip->i_update_core;
>}
Perhaps for greater readability:
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;
}
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists