Return-Path: Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S932339AbWBFTzM (ORCPT ); Mon, 6 Feb 2006 14:55:12 -0500 Received: (majordomo@vger.kernel.org) by vger.kernel.org id S932342AbWBFTzM (ORCPT ); Mon, 6 Feb 2006 14:55:12 -0500 Received: from ebiederm.dsl.xmission.com ([166.70.28.69]:12270 "EHLO ebiederm.dsl.xmission.com") by vger.kernel.org with ESMTP id S932339AbWBFTzI (ORCPT ); Mon, 6 Feb 2006 14:55:08 -0500 To: Cc: , Herbert Poetzl , "Serge E. Hallyn" , Alan Cox , Dave Hansen , Arjan van de Ven , Suleiman Souhlal , Hubertus Franke , Cedric Le Goater , Kyle Moffett , Kirill Korotaev , Greg , Linus Torvalds , Andrew Morton , Greg KH , Rik van Riel , Alexey Kuznetsov , Andrey Savochkin , Kirill Korotaev , Andi Kleen , Benjamin Herrenschmidt , Jeff Garzik , Trond Myklebust , Jes Sorensen Subject: [RFC][PATCH 11/20] ioprio: Update ioprio to handle pspaces. References: From: ebiederm@xmission.com (Eric W. Biederman) Date: Mon, 06 Feb 2006 12:51:58 -0700 In-Reply-To: (Eric W. Biederman's message of "Mon, 06 Feb 2006 12:49:20 -0700") Message-ID: User-Agent: Gnus/5.1007 (Gnus v5.10.7) Emacs/21.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: linux-kernel-owner@vger.kernel.org X-Mailing-List: linux-kernel@vger.kernel.org Content-Length: 2089 Lines: 75 Signed-off-by: Eric W. Biederman --- fs/ioprio.c | 13 +++++++------ 1 files changed, 7 insertions(+), 6 deletions(-) 42c8b99a7c1417f8fc587f86c218a0be10ec27d0 diff --git a/fs/ioprio.c b/fs/ioprio.c index ca77008..008301b 100644 --- a/fs/ioprio.c +++ b/fs/ioprio.c @@ -24,6 +24,7 @@ #include #include #include +#include static int set_task_ioprio(struct task_struct *task, int ioprio) { @@ -78,18 +79,18 @@ asmlinkage long sys_ioprio_set(int which if (!who) p = current; else - p = find_task_by_pid(who); + p = find_task_by_pid(current->pspace, who); if (p) ret = set_task_ioprio(p, ioprio); break; case IOPRIO_WHO_PGRP: if (!who) who = process_group(current); - do_each_task_pid(who, PIDTYPE_PGID, p) { + do_each_task_pid(current->pspace, who, PIDTYPE_PGID, p) { ret = set_task_ioprio(p, ioprio); if (ret) break; - } while_each_task_pid(who, PIDTYPE_PGID, p); + } while_each_task_pid(current->pspace, who, PIDTYPE_PGID, p); break; case IOPRIO_WHO_USER: if (!who) @@ -131,19 +132,19 @@ asmlinkage long sys_ioprio_get(int which if (!who) p = current; else - p = find_task_by_pid(who); + p = find_task_by_pid(current->pspace, who); if (p) ret = p->ioprio; break; case IOPRIO_WHO_PGRP: if (!who) who = process_group(current); - do_each_task_pid(who, PIDTYPE_PGID, p) { + do_each_task_pid(current->pspace, who, PIDTYPE_PGID, p) { if (ret == -ESRCH) ret = p->ioprio; else ret = ioprio_best(ret, p->ioprio); - } while_each_task_pid(who, PIDTYPE_PGID, p); + } while_each_task_pid(current->pspace, who, PIDTYPE_PGID, p); break; case IOPRIO_WHO_USER: if (!who) -- 1.1.5.g3480 - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/