From 5e748a92f68732d50a550d3ac8b7b89a91cbb7f1 Mon Sep 17 00:00:00 2001 From: bobijam Date: Mon, 3 Aug 2009 01:47:57 +0000 Subject: [PATCH] Branch b1_8 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 | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lustre/ost/ost_handler.c b/lustre/ost/ost_handler.c index 0f103dd..835af1f 100644 --- a/lustre/ost/ost_handler.c +++ b/lustre/ost/ost_handler.c @@ -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... */ -- 1.8.3.1