From: adilger Date: Mon, 22 Jul 2002 18:34:12 +0000 (+0000) Subject: Add helper function ptlrpc_bulk_addref() to match ptlrpc_bulk_decref(). X-Git-Tag: 0.5.1~19 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=6b7f4958fccb674d5d98eca9cc99a37352755ccf;p=fs%2Flustre-release.git Add helper function ptlrpc_bulk_addref() to match ptlrpc_bulk_decref(). --- diff --git a/lustre/include/linux/lustre_net.h b/lustre/include/linux/lustre_net.h index 65dd815..4d7125b 100644 --- a/lustre/include/linux/lustre_net.h +++ b/lustre/include/linux/lustre_net.h @@ -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