[PATCH 3/4] xfs: simplify xfs_ail_max
Christoph Hellwig
hch at infradead.org
Thu Dec 26 04:07:21 CST 2013
On Tue, Dec 24, 2013 at 08:48:26PM +0800, Jeff Liu wrote:
> From: Jie Liu <jeff.liu at oracle.com>
>
> We have already simplified xfs_ail_min() with a new list helper, i.e,
> list_first_entry_or_null(), but xfs_ail_max() still remains as same
> as there is no corresponding list helper we can use for now. It's
> fairly easy to simulate the list behavior of getting the last item
> in the AIL, therefore we can simplify xfs_ail_max() and move it to
> the header file to make this pair of AIL routines looks symmetrical.
The usageof list_last_entry is fine with me, as is making it inline.
But I think using the explicit if is a lot more readable than the ? :
expression.
More information about the xfs
mailing list