Whamcloud - gitweb
LU-8193 ptlrpc: set proper mbits for EINPROGRESS resend
[fs/lustre-release.git] / lustre / ptlrpc / niobuf.c
index 4dcbe3c..e7a694a 100644 (file)
@@ -27,7 +27,7 @@
  * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  *
- * Copyright (c) 2012, 2014, Intel Corporation.
+ * Copyright (c) 2012, 2015, Intel Corporation.
  */
 /*
  * This file is part of Lustre, http://www.lustre.org/
@@ -712,14 +712,15 @@ int ptl_send_rpc(struct ptlrpc_request *request, int noreply)
                 * reconstruction */
                spin_lock(&imp->imp_lock);
                ptlrpc_assign_next_xid_nolock(request);
-               request->rq_mbits = request->rq_xid;
                min_xid = ptlrpc_known_replied_xid(imp);
                spin_unlock(&imp->imp_lock);
 
                lustre_msg_set_last_xid(request->rq_reqmsg, min_xid);
                DEBUG_REQ(D_RPCTRACE, request, "Allocating new xid for "
                          "resend on EINPROGRESS");
-       } else if (request->rq_bulk != NULL) {
+       }
+
+       if (request->rq_bulk != NULL) {
                ptlrpc_set_bulk_mbits(request);
                lustre_msg_set_mbits(request->rq_reqmsg, request->rq_mbits);
        }