Whamcloud - gitweb
LU-12275 sec: atomicity of encryption context getting/setting
[fs/lustre-release.git] / lustre / mdt / mdt_open.c
index 5aa5314..9f10fc6 100644 (file)
@@ -1229,6 +1229,10 @@ static int mdt_cross_open(struct mdt_thread_info *info,
                        if (unlikely(rc))
                                GOTO(out, rc);
 
+                       rc = mdt_pack_encctx_in_reply(info, o);
+                       if (unlikely(rc))
+                               GOTO(out, rc);
+
                        rc = mdt_finish_open(info, NULL, o, open_flags, 0, rep);
                } else {
                        /*
@@ -1560,6 +1564,10 @@ int mdt_reint_open(struct mdt_thread_info *info, struct mdt_lock_handle *lhc)
        if (unlikely(rc))
                GOTO(out_child, result = rc);
 
+       rc = mdt_pack_encctx_in_reply(info, child);
+       if (unlikely(rc))
+               GOTO(out_child, result = rc);
+
        rc = mdt_check_resent_lock(info, child, lhc);
        if (rc < 0) {
                GOTO(out_child, result = rc);