Whamcloud - gitweb
- Comment out put_connection until we resolve the dep issue
authorpschwan <pschwan>
Wed, 2 Oct 2002 18:56:27 +0000 (18:56 +0000)
committerpschwan <pschwan>
Wed, 2 Oct 2002 18:56:27 +0000 (18:56 +0000)
- Can c ever be NULL in ptlrpc_put_connection?  I don't know, but I want to
  find out.

lustre/obdclass/genops.c
lustre/ptlrpc/connection.c

index ee32fdb..57e37e8 100644 (file)
@@ -352,7 +352,7 @@ struct obd_export *class_new_export(struct obd_device *obddev)
         struct obd_export * export;
 
         export = kmem_cache_alloc(export_cachep, GFP_KERNEL);
-        if ( !export ) {
+        if (!export) {
                 CERROR("no memory! (minor %d)\n", obddev->obd_minor);
                 return NULL;
         }
@@ -384,7 +384,7 @@ void class_destroy_export(struct obd_export *exp)
         list_del(&exp->exp_conn_chain);
         if (exp->exp_connection) {
                 spin_unlock(&exp->exp_connection->c_lock);
-                ptlrpc_put_connection(exp->exp_connection);
+                //ptlrpc_put_connection(exp->exp_connection);
         }
 
         kmem_cache_free(export_cachep, exp);
@@ -415,7 +415,7 @@ int class_connect(struct lustre_handle *conn, struct obd_device *obd,
 
         conn->addr = (__u64) (unsigned long)export;
         conn->cookie = export->exp_cookie;
-        
+
         CDEBUG(D_IOCTL, "connect: addr %Lx cookie %Lx\n",
                (long long)conn->addr, (long long)conn->cookie);
         return 0;
@@ -535,7 +535,8 @@ int class_multi_cleanup(struct obd_device *obddev)
 
         for (i = 0; i < obddev->obd_multi_count; i++) {
                 int rc;
-                struct obd_device *obd = class_conn2obd(&obddev->obd_multi_conn[i]);
+                struct obd_device *obd =
+                        class_conn2obd(&obddev->obd_multi_conn[i]);
 
                 if (!obd) {
                         CERROR("no such device [i %d]\n", i);
index 7a1d47b..0307ecb 100644 (file)
@@ -109,6 +109,11 @@ int ptlrpc_put_connection(struct ptlrpc_connection *c)
         int rc = 0;
         ENTRY;
 
+        if (c == NULL) {
+                CERROR("NULL connection\n");
+                RETURN(0);
+        }
+
         CDEBUG(D_INFO, "connection=%p refcount %d\n",
                c, atomic_read(&c->c_refcount) - 1);
         if (atomic_dec_and_test(&c->c_refcount)) {