| To: | Jeff Liu <jeff.liu@xxxxxxxxxx> |
|---|---|
| Subject: | Re: [PATCH v2] xfs: Simplify xfs_ail_min() with list_first_entry_or_null() |
| From: | Ben Myers <bpm@xxxxxxx> |
| Date: | Fri, 23 Aug 2013 13:06:30 -0500 |
| Cc: | "xfs@xxxxxxxxxxx" <xfs@xxxxxxxxxxx> |
| Delivered-to: | xfs@xxxxxxxxxxx |
| In-reply-to: | <520C6253.6080809@xxxxxxxxxx> |
| References: | <520C6253.6080809@xxxxxxxxxx> |
| User-agent: | Mutt/1.5.20 (2009-06-14) |
On Thu, Aug 15, 2013 at 01:08:35PM +0800, Jeff Liu wrote: > From: Jie Liu <jeff.liu@xxxxxxxxxx> > > At xfs_ail_min(), we do check if the AIL list is empty or not before > returning the first item in it with list_empty() and list_first_entry(). > > This can be simplified a bit with a new list operation routine that is > the list_first_entry_or_null() which has been introduced by: > > commit 6d7581e62f8be462440d7b22c6361f7c9fa4902b > list: introduce list_first_entry_or_null > > v2: make xfs_ail_min() as a static inline function and move it to > xfs_trans_priv.h as per Dave Chinner's comments. > > Signed-off-by: Jie Liu <jeff.liu@xxxxxxxxxx> Reviewed-by: Ben Myers <bpm@xxxxxxx> Applied. Thanks Jeff. |
| <Prev in Thread] | Current Thread | [Next in Thread> |
|---|---|---|
| ||
| Previous by Date: | Re: XFS: Assertion failed: first <= last && last < BBTOB(bp->b_length), file: fs/xfs/xfs_trans_buf.c, line: 568, Mark Tinguely |
|---|---|
| Next by Date: | Earn Money With Your Computer, Sergio |
| Previous by Thread: | [PATCH v2] xfs: Simplify xfs_ail_min() with list_first_entry_or_null(), Jeff Liu |
| Next by Thread: | [patch] xfs: check for underflow in xfs_iformat_fork(), Dan Carpenter |
| Indexes: | [Date] [Thread] [Top] [All Lists] |