Whamcloud - gitweb
Branch b1_8
authorbobijam <bobijam>
Mon, 3 Aug 2009 01:47:57 +0000 (01:47 +0000)
committerbobijam <bobijam>
Mon, 3 Aug 2009 01:47:57 +0000 (01:47 +0000)
b=20219
o=johann
i=andrew.perepechko (panda)
i=alexander.zarochentsev (zam)

Release lock ref for lockless i/o if allocation failure.

lustre/ost/ost_handler.c

index 0f103dd..835af1f 100644 (file)
@@ -723,8 +723,8 @@ static int ost_brw_read(struct ptlrpc_request *req, struct obd_trans_info *oti)
 
         desc = ptlrpc_prep_bulk_exp(req, npages,
                                      BULK_PUT_SOURCE, OST_BULK_PORTAL);
-        if (desc == NULL) /* XXX: check all cleanup stuff */
-                GOTO(out, rc = -ENOMEM);
+        if (desc == NULL)
+                GOTO(out_lock, rc = -ENOMEM);
 
         ost_rw_prolong_locks(req, ioo, remote_nb, &body->oa, LCK_PW | LCK_PR);
 
@@ -1000,7 +1000,7 @@ static int ost_brw_write(struct ptlrpc_request *req, struct obd_trans_info *oti)
         desc = ptlrpc_prep_bulk_exp(req, npages,
                                      BULK_GET_SINK, OST_BULK_PORTAL);
         if (desc == NULL)
-                GOTO(out, rc = -ENOMEM);
+                GOTO(out_lock, rc = -ENOMEM);
 
         /* NB Having prepped, we must commit... */