Whamcloud - gitweb
LU-837 release semaphore for error case in gss_do_ctx_init_rpc
[fs/lustre-release.git] / lustre / ptlrpc / gss / gss_bulk.c
index f8723f5..5e90010 100644 (file)
@@ -26,7 +26,7 @@
  * GPL HEADER END
  */
 /*
- * Copyright  2008 Sun Microsystems, Inc. All rights reserved
+ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved.
  * Use is subject to license terms.
  */
 /*
@@ -48,7 +48,6 @@
 #include <linux/slab.h>
 #include <linux/dcache.h>
 #include <linux/fs.h>
-#include <linux/random.h>
 #include <linux/mutex.h>
 #include <linux/crypto.h>
 #else
@@ -291,7 +290,8 @@ int gss_cli_ctx_unwrap_bulk(struct ptlrpc_cli_ctx *ctx,
                         token.len = lustre_msg_buflen(vmsg, voff) -
                                     sizeof(*bsdr);
 
-                        maj = lgss_unwrap_bulk(gctx->gc_mechctx, desc, &token);
+                        maj = lgss_unwrap_bulk(gctx->gc_mechctx, desc,
+                                               &token, 1);
                         if (maj != GSS_S_COMPLETE) {
                                 CERROR("failed to decrypt bulk read: %x\n",
                                        maj);
@@ -433,7 +433,7 @@ int gss_svc_unwrap_bulk(struct ptlrpc_request *req,
                 token.len = grctx->src_reqbsd_size - sizeof(*bsdr);
 
                 maj = lgss_unwrap_bulk(grctx->src_ctx->gsc_mechctx,
-                                       desc, &token);
+                                       desc, &token, 0);
                 if (maj != GSS_S_COMPLETE) {
                         bsdv->bsd_flags |= BSD_FL_ERR;
                         CERROR("failed decrypt bulk data: %x\n", maj);