Whamcloud - gitweb
Don't oops if there is no recovd for a connection. Mike needs to confirm if
authoradilger <adilger>
Sun, 8 Sep 2002 19:39:30 +0000 (19:39 +0000)
committeradilger <adilger>
Sun, 8 Sep 2002 19:39:30 +0000 (19:39 +0000)
that is wrong (to not have a recovd), or if this fix is correct.

lustre/ptlrpc/recovd.c

index 476c285..3f10733 100644 (file)
@@ -42,6 +42,11 @@ void recovd_conn_fail(struct ptlrpc_connection *conn)
         struct recovd_obd *recovd = rd->rd_recovd;
         ENTRY;
 
+        if (!recovd) {
+                CERROR("no recovd for connection %p\n", conn);
+                return;
+        }
+
         spin_lock(&recovd->recovd_lock);
         list_del(&rd->rd_managed_chain);
         list_add_tail(&rd->rd_managed_chain, &recovd->recovd_troubled_items);