[PATCH 3/4] xfs: simplify xfs_ail_max

Jeff Liu jeff.liu at oracle.com
Thu Dec 26 04:52:33 CST 2013


On 12/26 2013 18:07 PM, Christoph Hellwig wrote:
> 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.
Sounds sensible to me, will take care of it.

Thanks,
-Jeff



More information about the xfs mailing list