mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: jmorris@namei.org, akpm@linux-foundation.org, morgan@kernel.org
Cc: sfr@canb.auug.org.au, dhowells@redhat.com, viro@ftp.linux.org.uk,
	casey@schaufler-ca.com, linux-security-module@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH 14/24] CRED: Rename is_single_threaded() to is_wq_single_threaded() [ver #7]
Date: Wed, 06 Aug 2008 16:38:26 +0100	[thread overview]
Message-ID: <20080806153826.14351.77173.stgit@warthog.procyon.org.uk> (raw)
In-Reply-To: <20080806153713.14351.91448.stgit@warthog.procyon.org.uk>

Rename is_single_threaded() to is_wq_single_threaded() so that a new
is_single_threaded() can be created that refers to tasks rather than
waitqueues.

Signed-off-by: David Howells <dhowells@redhat.com>
Reviewed-by: James Morris <jmorris@namei.org>
---

 kernel/workqueue.c |    8 ++++----
 1 files changed, 4 insertions(+), 4 deletions(-)


diff --git a/kernel/workqueue.c b/kernel/workqueue.c
index 4a26a13..e4e2bd3 100644
--- a/kernel/workqueue.c
+++ b/kernel/workqueue.c
@@ -83,21 +83,21 @@ static cpumask_t cpu_singlethread_map __read_mostly;
 static cpumask_t cpu_populated_map __read_mostly;
 
 /* If it's single threaded, it isn't in the list of workqueues. */
-static inline int is_single_threaded(struct workqueue_struct *wq)
+static inline int is_wq_single_threaded(struct workqueue_struct *wq)
 {
 	return wq->singlethread;
 }
 
 static const cpumask_t *wq_cpu_map(struct workqueue_struct *wq)
 {
-	return is_single_threaded(wq)
+	return is_wq_single_threaded(wq)
 		? &cpu_singlethread_map : &cpu_populated_map;
 }
 
 static
 struct cpu_workqueue_struct *wq_per_cpu(struct workqueue_struct *wq, int cpu)
 {
-	if (unlikely(is_single_threaded(wq)))
+	if (unlikely(is_wq_single_threaded(wq)))
 		cpu = singlethread_cpu;
 	return per_cpu_ptr(wq->cpu_wq, cpu);
 }
@@ -767,7 +767,7 @@ init_cpu_workqueue(struct workqueue_struct *wq, int cpu)
 static int create_workqueue_thread(struct cpu_workqueue_struct *cwq, int cpu)
 {
 	struct workqueue_struct *wq = cwq->wq;
-	const char *fmt = is_single_threaded(wq) ? "%s" : "%s/%d";
+	const char *fmt = is_wq_single_threaded(wq) ? "%s" : "%s/%d";
 	struct task_struct *p;
 
 	p = kthread_create(worker_thread, cwq, fmt, wq->name, cpu);


  parent reply	other threads:[~2008-08-06 15:40 UTC|newest]

Thread overview: 30+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-08-06 15:37 [PATCH 00/24] Introduce credentials " David Howells
2008-08-06 15:37 ` [PATCH 01/24] Fix setting of PF_SUPERPRIV by __capable() " David Howells
2008-08-06 15:37 ` [PATCH 02/24] KEYS: Disperse linux/key_ui.h " David Howells
2008-08-06 15:37 ` [PATCH 03/24] KEYS: Alter use of key instantiation link-to-keyring argument " David Howells
2008-08-06 15:37 ` [PATCH 04/24] CRED: Neuter sys_capset() " David Howells
2008-08-06 15:37 ` [PATCH 05/24] CRED: Constify the kernel_cap_t arguments to the capset LSM hooks " David Howells
2008-08-06 15:37 ` [PATCH 06/24] CRED: Change current->fs[ug]id to current_fs[ug]id() " David Howells
2008-08-06 15:37 ` [PATCH 07/24] CRED: Wrap most current->e?[ug]id and some task->e?[ug]id " David Howells
2008-08-06 15:37 ` [PATCH 08/24] CRED: Separate task security context from task_struct " David Howells
2008-08-06 15:38 ` [PATCH 09/24] CRED: Detach the credentials " David Howells
2008-08-06 15:38 ` [PATCH 10/24] CRED: Wrap current->cred and a few other accessors " David Howells
2008-08-06 15:38 ` [PATCH 11/24] CRED: Use RCU to access another task's creds and to release a task's own creds " David Howells
2008-08-06 15:38 ` [PATCH 12/24] CRED: Wrap access to SELinux's task SID " David Howells
2008-08-06 15:38 ` [PATCH 13/24] CRED: Separate per-task-group keyrings from signal_struct " David Howells
2008-08-06 15:38 ` David Howells [this message]
2008-08-06 15:38 ` [PATCH 15/24] CRED: Make inode_has_perm() and file_has_perm() take a cred pointer " David Howells
2008-08-06 15:38 ` [PATCH 16/24] CRED: Pass credentials through dentry_open() " David Howells
2008-08-06 15:38 ` [PATCH 17/24] CRED: Inaugurate COW credentials " David Howells
2008-08-06 15:38 ` [PATCH 18/24] CRED: Make execve() take advantage of copy-on-write " David Howells
2008-08-06 15:38 ` [PATCH 19/24] CRED: Prettify commoncap.c " David Howells
2008-08-06 15:38 ` [PATCH 20/24] CRED: Use creds in file structs " David Howells
2008-08-06 15:39 ` [PATCH 21/24] CRED: Documentation " David Howells
2008-08-06 15:39 ` [PATCH 22/24] CRED: Differentiate objective and effective subjective credentials on a task " David Howells
2008-08-06 15:39 ` [PATCH 23/24] CRED: Add a kernel_service object class to SELinux " David Howells
2008-08-06 15:39 ` [PATCH 24/24] CRED: Allow kernel services to override LSM settings for task actions " David Howells
2008-08-07  8:50 ` [PATCH 00/24] Introduce credentials " James Morris
2008-08-07  9:32 ` David Howells
2008-08-07  9:56   ` James Morris
2008-08-07 12:03 ` James Morris
2008-08-08  0:23   ` Stephen Rothwell

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20080806153826.14351.77173.stgit@warthog.procyon.org.uk \
    --to=dhowells@redhat.com \
    --cc=akpm@linux-foundation.org \
    --cc=casey@schaufler-ca.com \
    --cc=jmorris@namei.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-security-module@vger.kernel.org \
    --cc=morgan@kernel.org \
    --cc=sfr@canb.auug.org.au \
    --cc=viro@ftp.linux.org.uk \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®