Whamcloud - gitweb
LU-8672 tests: Fix error handling in replay-single test_89
[fs/lustre-release.git] / lustre / include / lustre_update.h
index bed00f9..f8766f6 100644 (file)
@@ -20,7 +20,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright (c) 2013, 2016, Intel Corporation.
+ * Copyright (c) 2013, 2017, Intel Corporation.
  */
 /*
  * lustre/include/lustre_update.h
@@ -34,7 +34,6 @@
 #include <lustre_net.h>
 #include <obj_update.h>
 
-#define OUT_UPDATE_INIT_BUFFER_SIZE    4096
 #define OUT_UPDATE_REPLY_SIZE          4096
 #define OUT_BULK_BUFFER_SIZE           4096
 
@@ -242,20 +241,14 @@ object_update_result_insert(struct object_update_reply *reply,
                            int rc)
 {
        struct object_update_result *update_result;
-       char *ptr;
 
        update_result = object_update_result_get(reply, index, NULL);
        LASSERT(update_result);
 
        update_result->our_rc = ptlrpc_status_hton(rc);
        if (rc >= 0) {
-               if (data_len > 0) {
-                       LASSERT(data);
-
-                       ptr = (char *)update_result +
-                       cfs_size_round(sizeof(struct object_update_reply));
-                       memcpy(ptr, data, data_len);
-               }
+               if (data_len > 0 && data)
+                       memcpy(update_result->our_data, data, data_len);
                update_result->our_datalen = data_len;
        }