summaryrefslogtreecommitdiff
path: root/drivers/infiniband/hw/ehca/ehca_pd.c
diff options
context:
space:
mode:
authorHoang-Nam Nguyen <hnguyen@de.ibm.com>2008-04-17 08:01:13 +0400
committerRoland Dreier <rolandd@cisco.com>2008-04-17 08:01:13 +0400
commitf4f82994d1ea0cd01058a245985f1eb5e569e6d3 (patch)
tree67244352967536dd4330928cd53c3e37011fa2ec /drivers/infiniband/hw/ehca/ehca_pd.c
parent1e89a1946cfd906d12eff437d2a76b3aa7f5e731 (diff)
downloadlinux-f4f82994d1ea0cd01058a245985f1eb5e569e6d3.tar.xz
IB/ehca: Remove tgid checking
Pavel Emelyanov <xemul@openvz.org> mentioned in <http://lkml.org/lkml/2008/3/17/131> that the task_struct->tgid field is about to become deprecated, so the uses in the ehca driver need to be fixed up. However, all the uses in ehca are for some object ownership checking that is not really needed, and anyway is implementing a policy that should be in common code rather than a low-level driver. So just remove all the checks. Signed-off-by: Hoang-Nam Nguyen <hnguyen@de.ibm.com> Signed-off-by: Roland Dreier <rolandd@cisco.com>
Diffstat (limited to 'drivers/infiniband/hw/ehca/ehca_pd.c')
-rw-r--r--drivers/infiniband/hw/ehca/ehca_pd.c11
1 files changed, 0 insertions, 11 deletions
diff --git a/drivers/infiniband/hw/ehca/ehca_pd.c b/drivers/infiniband/hw/ehca/ehca_pd.c
index 43bcf085fcf2..2fe554855fa5 100644
--- a/drivers/infiniband/hw/ehca/ehca_pd.c
+++ b/drivers/infiniband/hw/ehca/ehca_pd.c
@@ -38,8 +38,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
-#include <asm/current.h>
-
#include "ehca_tools.h"
#include "ehca_iverbs.h"
@@ -58,7 +56,6 @@ struct ib_pd *ehca_alloc_pd(struct ib_device *device,
return ERR_PTR(-ENOMEM);
}
- pd->ownpid = current->tgid;
for (i = 0; i < 2; i++) {
INIT_LIST_HEAD(&pd->free[i]);
INIT_LIST_HEAD(&pd->full[i]);
@@ -85,18 +82,10 @@ struct ib_pd *ehca_alloc_pd(struct ib_device *device,
int ehca_dealloc_pd(struct ib_pd *pd)
{
- u32 cur_pid = current->tgid;
struct ehca_pd *my_pd = container_of(pd, struct ehca_pd, ib_pd);
int i, leftovers = 0;
struct ipz_small_queue_page *page, *tmp;
- if (my_pd->ib_pd.uobject && my_pd->ib_pd.uobject->context &&
- my_pd->ownpid != cur_pid) {
- ehca_err(pd->device, "Invalid caller pid=%x ownpid=%x",
- cur_pid, my_pd->ownpid);
- return -EINVAL;
- }
-
for (i = 0; i < 2; i++) {
list_splice(&my_pd->full[i], &my_pd->free[i]);
list_for_each_entry_safe(page, tmp, &my_pd->free[i], list) {