| To: | Christoph Hellwig <hch@xxxxxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH 9/9] Clean up open coded inode dirty checks |
| From: | Jan Engelhardt <jengelh@xxxxxxxxxxxxxxx> |
| Date: | Fri, 23 Nov 2007 19:16:08 +0100 (CET) |
| Cc: | David Chinner <dgc@xxxxxxx>, xfs-oss <xfs@xxxxxxxxxxx>, lkml <linux-kernel@xxxxxxxxxxxxxxx> |
| In-reply-to: | <20071123180239.GA13229@infradead.org> |
| References: | <20071122004422.GO114266761@sgi.com> <20071123180239.GA13229@infradead.org> |
| Sender: | xfs-bounce@xxxxxxxxxxx |
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;
}
|
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Christoph Hellwig |
|---|---|
| Next by Date: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Jan Engelhardt |
| Previous by Thread: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Christoph Hellwig |
| Next by Thread: | Re: [PATCH 9/9] Clean up open coded inode dirty checks, Joe Perches |
| Indexes: | [Date] [Thread] [Top] [All Lists] |