The patch titled Subject: ocfs2/dlm: use list_for_each_entry instead of list_for_each has been added to the -mm tree. Its filename is ocfs2-dlm-use-list_for_each_entry-instead-of-list_for_each.patch This patch should soon appear at http://ozlabs.org/~akpm/mmots/broken-out/ocfs2-dlm-use-list_for_each_entry-instead-of-list_for_each.patch and later at http://ozlabs.org/~akpm/mmotm/broken-out/ocfs2-dlm-use-list_for_each_entry-instead-of-list_for_each.patch Before you just go and hit "reply", please: a) Consider who else should be cc'ed b) Prefer to cc a suitable mailing list as well c) Ideally: find the original patch on the mailing list and do a reply-to-all to that, adding suitable additional cc's *** Remember to use Documentation/SubmitChecklist when testing your code *** The -mm tree is included into linux-next and is updated there every 3-4 working days ------------------------------------------------------ From: Joseph Qi <joseph.qi@xxxxxxxxxx> Subject: ocfs2/dlm: use list_for_each_entry instead of list_for_each Use list_for_each_entry instead of list_for_each to simplify code. Signed-off-by: Joseph Qi <joseph.qi@xxxxxxxxxx> Cc: Mark Fasheh <mfasheh@xxxxxxxx> Cc: Joel Becker <jlbec@xxxxxxxxxxxx> Signed-off-by: Andrew Morton <akpm@xxxxxxxxxxxxxxxxxxxx> --- fs/ocfs2/dlm/dlmrecovery.c | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff -puN fs/ocfs2/dlm/dlmrecovery.c~ocfs2-dlm-use-list_for_each_entry-instead-of-list_for_each fs/ocfs2/dlm/dlmrecovery.c --- a/fs/ocfs2/dlm/dlmrecovery.c~ocfs2-dlm-use-list_for_each_entry-instead-of-list_for_each +++ a/fs/ocfs2/dlm/dlmrecovery.c @@ -1776,7 +1776,7 @@ static int dlm_process_recovery_data(str struct dlm_migratable_lockres *mres) { struct dlm_migratable_lock *ml; - struct list_head *queue, *iter; + struct list_head *queue; struct list_head *tmpq = NULL; struct dlm_lock *newlock = NULL; struct dlm_lockstatus *lksb = NULL; @@ -1821,9 +1821,7 @@ static int dlm_process_recovery_data(str spin_lock(&res->spinlock); for (j = DLM_GRANTED_LIST; j <= DLM_BLOCKED_LIST; j++) { tmpq = dlm_list_idx_to_ptr(res, j); - list_for_each(iter, tmpq) { - lock = list_entry(iter, - struct dlm_lock, list); + list_for_each_entry(lock, tmpq, list) { if (lock->ml.cookie == ml->cookie) break; lock = NULL; _ Patches currently in -mm which might be from joseph.qi@xxxxxxxxxx are ocfs2-fix-race-between-dio-and-recover-orphan.patch ocfs2-fix-several-issues-of-append-dio.patch ocfs2-do-not-bug-if-buffer-not-uptodate-in-__ocfs2_journal_access.patch ocfs2-clean-up-unused-local-variables-in-ocfs2_file_write_iter.patch ocfs2-adjust-code-to-match-locking-unlocking-order.patch ocfs2-remove-unneeded-code-in-ocfs2_dlm_init.patch ocfs2-fix-bug-when-o2hb_register_callback-fails.patch ocfs2-remove-unneeded-code-in-dlm_register_domain_handlers.patch ocfs2-dlm-use-list_for_each_entry-instead-of-list_for_each.patch ocfs2-fix-race-between-crashed-dio-and-rm.patch -- To unsubscribe from this list: send the line "unsubscribe mm-commits" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html