Whamcloud - gitweb
- llog_origin_connect() should expect 1 from successful llog_add()
authoralex <alex>
Tue, 20 Oct 2009 03:58:38 +0000 (03:58 +0000)
committeralex <alex>
Tue, 20 Oct 2009 03:58:38 +0000 (03:58 +0000)
lustre/ptlrpc/llog_net.c

index 5e80bd7..d6df825 100644 (file)
@@ -70,7 +70,7 @@ int llog_origin_connect(struct llog_ctxt *ctxt,
         struct llog_gen_rec    *lgr;
         struct ptlrpc_request  *req;
         struct llogd_conn_body *req_body;
-        int rc, rc1;
+        int rc;
 
         ENTRY;
 
@@ -92,7 +92,7 @@ int llog_origin_connect(struct llog_ctxt *ctxt,
         lgr->lgr_gen = ctxt->loc_gen;
         rc = llog_add(ctxt, &lgr->lgr_hdr, NULL, NULL, 1);
         OBD_FREE_PTR(lgr);
-        if (rc)
+        if (rc != 1)
                 RETURN(rc);
 
         LASSERT(ctxt->loc_imp);