X-Git-Url: https://git.whamcloud.com/?p=fs%2Flustre-release.git;a=blobdiff_plain;f=lustre%2Fmdd%2Fmdd_object.c;h=e431fdfc0882e8bc11cbb92627968c5b32c30f90;hp=3742191e930cf7a8f26bcf9cdb9c4a5d9b4fa05d;hb=7648c1c905b0976fc789cfd9c6bac382389385ee;hpb=3ad89522912d74ec1c854e449957c45d1285cb25 diff --git a/lustre/mdd/mdd_object.c b/lustre/mdd/mdd_object.c index 3742191..e431fdf 100644 --- a/lustre/mdd/mdd_object.c +++ b/lustre/mdd/mdd_object.c @@ -2714,13 +2714,17 @@ out_restore: if (rc2 < 0) goto do_lbug; - ++steps; - rc2 = mdd_xattr_hsm_replace(env, fst_o, fst_hsm_buf, handle); - if (rc2 < 0) - goto do_lbug; + if (flags & SWAP_LAYOUTS_MDS_HSM) { + ++steps; + rc2 = mdd_xattr_hsm_replace(env, fst_o, fst_hsm_buf, + handle); + if (rc2 < 0) + goto do_lbug; - ++steps; - rc2 = mdd_xattr_hsm_replace(env, snd_o, snd_hsm_buf, handle); + ++steps; + rc2 = mdd_xattr_hsm_replace(env, snd_o, snd_hsm_buf, + handle); + } do_lbug: if (rc2 < 0) {