From: adilger Date: Thu, 14 Nov 2002 23:32:53 +0000 (+0000) Subject: Decrement the LOV module use count on connect errors. X-Git-Tag: 0.5.17~5 X-Git-Url: https://git.whamcloud.com/gitweb?a=commitdiff_plain;h=846877d54358915890f26be817b90a7ea67b47e6;p=fs%2Flustre-release.git Decrement the LOV module use count on connect errors. --- diff --git a/lustre/lov/lov_obd.c b/lustre/lov/lov_obd.c index 7d41e3b..50feb49 100644 --- a/lustre/lov/lov_obd.c +++ b/lustre/lov/lov_obd.c @@ -58,10 +58,8 @@ static int lov_connect(struct lustre_handle *conn, struct obd_device *obd, MOD_INC_USE_COUNT; rc = class_connect(conn, obd, cluuid); - if (rc) { - MOD_DEC_USE_COUNT; - RETURN(rc); - } + if (rc) + GOTO(out_dec, rc); /* We don't want to actually do the underlying connections more than * once, so keep track. */ @@ -193,6 +191,8 @@ static int lov_connect(struct lustre_handle *conn, struct obd_device *obd, OBD_FREE(lov->tgts, lov->bufsize); out_conn: class_disconnect(conn); + out_dec: + MOD_DEC_USE_COUNT; goto out; }