From: Wu Libin Date: Wed, 28 Jan 2015 05:55:20 +0000 (+0800) Subject: LU-6167 utils: fix bugs in lustre_sync X-Git-Tag: 2.6.94~7 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=refs%2Fchanges%2F45%2F13545%2F3 LU-6167 utils: fix bugs in lustre_sync The lustre_rsync will cause endloop and core dump problems, this patch fix this problems. In function lr_cascade_move, it should delete "curr" node in the "parents" list first, then move to the next lr_cascade_move. Signed-off-by: Wu Libin Change-Id: I5a5686ab89379da37453d07a5a00df4fd217ee59 Reviewed-on: http://review.whamcloud.com/13545 Tested-by: Jenkins Tested-by: Maloo Reviewed-by: Dmitry Eremin Reviewed-by: Yang Sheng Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lustre_rsync.c b/lustre/utils/lustre_rsync.c index e27df3e..086dc21 100644 --- a/lustre/utils/lustre_rsync.c +++ b/lustre/utils/lustre_rsync.c @@ -674,11 +674,11 @@ void lr_cascade_move(const char *fid, const char *dest, struct lr_info *info) info->src, d, errno); errors++; } - lr_cascade_move(curr->pc_log.pcl_tfid, d, info); if (curr == parents) parents = curr->pc_next; else prev->pc_next = curr->pc_next; + lr_cascade_move(curr->pc_log.pcl_tfid, d, info); free(curr); prev = curr = parents;