Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel...
[linux-2.6-block.git] / include / rdma / restrack.h
index 2638fa7cd702178afcd1d8bb7a8cdf464d4f2372..8f179be9d9a9e6ef3d2876993cafed5da9a481a4 100644 (file)
@@ -38,6 +38,10 @@ enum rdma_restrack_type {
         * @RDMA_RESTRACK_MR: Memory Region (MR)
         */
        RDMA_RESTRACK_MR,
+       /**
+        * @RDMA_RESTRACK_CTX: Verbs contexts (CTX)
+        */
+       RDMA_RESTRACK_CTX,
        /**
         * @RDMA_RESTRACK_MAX: Last entry, used for array dclarations
         */
@@ -112,6 +116,10 @@ struct rdma_restrack_entry {
         * @type: various objects in restrack database
         */
        enum rdma_restrack_type type;
+       /**
+        * @user: user resource
+        */
+       bool                    user;
 };
 
 /**
@@ -136,11 +144,8 @@ int rdma_restrack_count(struct rdma_restrack_root *res,
                        enum rdma_restrack_type type,
                        struct pid_namespace *ns);
 
-/**
- * rdma_restrack_add() - add object to the reource tracking database
- * @res:  resource entry
- */
-void rdma_restrack_add(struct rdma_restrack_entry *res);
+void rdma_restrack_kadd(struct rdma_restrack_entry *res);
+void rdma_restrack_uadd(struct rdma_restrack_entry *res);
 
 /**
  * rdma_restrack_del() - delete object from the reource tracking database
@@ -155,7 +160,7 @@ void rdma_restrack_del(struct rdma_restrack_entry *res);
  */
 static inline bool rdma_is_kernel_res(struct rdma_restrack_entry *res)
 {
-       return !res->task;
+       return !res->user;
 }
 
 /**