Whamcloud - gitweb
branch: b_new_cmd
authorericm <ericm>
Thu, 2 Nov 2006 21:29:20 +0000 (21:29 +0000)
committerericm <ericm>
Thu, 2 Nov 2006 21:29:20 +0000 (21:29 +0000)
fix assertion: enc pages might be allocated by previous failed bulk rpc.

lustre/ptlrpc/sec_bulk.c

index 8099711..9bb66b2 100644 (file)
@@ -368,10 +368,13 @@ int sptlrpc_enc_pool_get_pages(struct ptlrpc_bulk_desc *desc)
         int             p_idx, g_idx;
         int             i;
 
-        LASSERT(desc->bd_enc_pages == NULL);
         LASSERT(desc->bd_max_iov > 0);
         LASSERT(desc->bd_max_iov <= page_pools.epp_total_pages);
 
+        /* resent bulk, enc pages might have been allocated previously */
+        if (desc->bd_enc_pages != NULL)
+                return 0;
+
         OBD_ALLOC(desc->bd_enc_pages,
                   desc->bd_max_iov * sizeof(*desc->bd_enc_pages));
         if (desc->bd_enc_pages == NULL)