From: John L. Hammond Date: Tue, 27 Aug 2013 14:08:18 +0000 (-0500) Subject: LU-3835 hsm: add missing braces to ct_copy_attr() X-Git-Tag: 2.4.92~34 X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=commitdiff_plain;h=6231637eeef0998c224c9b23d52da1397476f0b6 LU-3835 hsm: add missing braces to ct_copy_attr() Add missing braces to ct_copy_attr() in lhsmtool_posix.c so that we don't return a stale errno on success. Signed-off-by: John L. Hammond Change-Id: Ia8ab377d8fd00d94666b15713f4e749d1330854a Reviewed-on: http://review.whamcloud.com/7462 Tested-by: Hudson Reviewed-by: jacques-Charles Lafoucriere Tested-by: Maloo Reviewed-by: Oleg Drokin --- diff --git a/lustre/utils/lhsmtool_posix.c b/lustre/utils/lhsmtool_posix.c index c2b4df4..dd496f1 100644 --- a/lustre/utils/lhsmtool_posix.c +++ b/lustre/utils/lhsmtool_posix.c @@ -714,10 +714,12 @@ static int ct_copy_attr(const char *src, const char *dst, int src_fd, times[1].tv_usec = 0; if (fchmod(dst_fd, st.st_mode) < 0 || fchown(dst_fd, st.st_uid, st.st_gid) < 0 || - futimes(dst_fd, times) < 0) + futimes(dst_fd, times) < 0) { CT_ERROR("'%s' fchmod fchown or futimes failed (%s)\n", src, strerror(errno)); return -errno; + } + return 0; }