Whamcloud - gitweb
Add helper function ptlrpc_bulk_addref() to match ptlrpc_bulk_decref().
authoradilger <adilger>
Mon, 22 Jul 2002 18:34:12 +0000 (18:34 +0000)
committeradilger <adilger>
Mon, 22 Jul 2002 18:34:12 +0000 (18:34 +0000)
lustre/include/linux/lustre_net.h

index 65dd815..4d7125b 100644 (file)
@@ -209,8 +209,8 @@ static inline void ptlrpc_hdl2req(struct ptlrpc_request *req, struct lustre_hand
 }
 struct ptlrpc_request *ptlrpc_prep_req2(struct ptlrpc_client *cl,
                                         struct ptlrpc_connection *conn,
-                                        struct lustre_handle *handle, 
-                                       int opcode, int count, int *lengths,
+                                        struct lustre_handle *handle,
+                                        int opcode, int count, int *lengths,
                                         char **bufs);
 
 typedef void (*bulk_callback_t)(struct ptlrpc_bulk_desc *, void *);
@@ -296,4 +296,11 @@ static inline void ptlrpc_bulk_decref(struct ptlrpc_bulk_desc *desc)
         }
 }
 
+static inline void ptlrpc_bulk_addref(struct ptlrpc_bulk_desc *desc)
+{
+        atomic_inc(&desc->b_refcount);
+        CDEBUG(D_PAGE, "Set refcount of %p to %d\n", desc,
+               atomic_read(&desc->b_refcount));
+}
+
 #endif