X-Git-Url: https://git.whamcloud.com/?a=blobdiff_plain;f=lustre%2Futils%2Flustre_rsync.c;h=5d28634f4597d03a234d922b9fcbd887b4e626f1;hb=f625f670afbe954030ff81f0f8522137d6cdd335;hp=04b6c226216f988990c720564438453b636dd73e;hpb=62a9ad817017d677b1914f0838d4a66ce64d2270;p=fs%2Flustre-release.git diff --git a/lustre/utils/lustre_rsync.c b/lustre/utils/lustre_rsync.c index 04b6c22..5d28634 100644 --- a/lustre/utils/lustre_rsync.c +++ b/lustre/utils/lustre_rsync.c @@ -27,7 +27,7 @@ * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved. * Use is subject to license terms. * - * Copyright (c) 2012, Intel Corporation. + * Copyright (c) 2012, 2014, Intel Corporation. */ /* * This file is part of Lustre, http://www.lustre.org/ @@ -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; @@ -1005,7 +1005,7 @@ int lr_link(struct lr_info *info) break; len = strlen(info->path) - strlen(info->name); - if (len > 0 && strcmp(info->path + len, + if (len >= 0 && strcmp(info->path + len, info->name) == 0) snprintf(info->dest, PATH_MAX, "%s/%s", status->ls_targets[info->target_no],