From 846877d54358915890f26be817b90a7ea67b47e6 Mon Sep 17 00:00:00 2001 From: adilger Date: Thu, 14 Nov 2002 23:32:53 +0000 Subject: [PATCH] Decrement the LOV module use count on connect errors. --- lustre/lov/lov_obd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) 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; } -- 1.8.3.1