summaryrefslogtreecommitdiff
path: root/fs/xfs/xfs_log_cil.c
diff options
context:
space:
mode:
authorDave Chinner <david@fromorbit.com>2015-07-29 01:54:07 (GMT)
committerDave Chinner <david@fromorbit.com>2015-07-29 01:54:07 (GMT)
commit20b83944361908be78c941e0fb76d508124637ec (patch)
treed74c77137af23af21ed767e4a877008444bae754 /fs/xfs/xfs_log_cil.c
parentdf150ed102baa0e78c06e08e975dfb47147dd677 (diff)
parent1cfc4a9cf89d23727c6678170aa5949a676fc566 (diff)
downloadlinux-20b83944361908be78c941e0fb76d508124637ec.tar.xz
Merge branch 'xfs-misc-fixes-for-4.3' into for-next
Diffstat (limited to 'fs/xfs/xfs_log_cil.c')
-rw-r--r--fs/xfs/xfs_log_cil.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/fs/xfs/xfs_log_cil.c b/fs/xfs/xfs_log_cil.c
index abc2ccb..4e76493 100644
--- a/fs/xfs/xfs_log_cil.c
+++ b/fs/xfs/xfs_log_cil.c
@@ -307,7 +307,13 @@ xlog_cil_insert_items(
if (!(lidp->lid_flags & XFS_LID_DIRTY))
continue;
- list_move_tail(&lip->li_cil, &cil->xc_cil);
+ /*
+ * Only move the item if it isn't already at the tail. This is
+ * to prevent a transient list_empty() state when reinserting
+ * an item that is already the only item in the CIL.
+ */
+ if (!list_is_last(&lip->li_cil, &cil->xc_cil))
+ list_move_tail(&lip->li_cil, &cil->xc_cil);
}
/* account for space used by new iovec headers */