-- if (always_checksum && am_sender && S_ISREG(st.st_mode))
-+ if (always_checksum && am_sender && S_ISREG(st.st_mode)
-+ && !get_sum_xattr(thisname, &st, tmp_sum))
- file_checksum(thisname, tmp_sum, st.st_size);
-
- if (am_sender)
+ if (always_checksum && am_sender && S_ISREG(st.st_mode)) {
+- file_checksum(thisname, tmp_sum, st.st_size);
++ if (!get_sum_xattr(thisname, &st, tmp_sum))
++ file_checksum(thisname, tmp_sum, st.st_size);
+ if (sender_keeps_checksum)
+ extra_len += SUM_EXTRA_CNT * EXTRA_LEN;
+ }