From: Jiri Slaby <jirislaby@gmail.com>
To: sukadev@us.ibm.com
Cc: Andrew Morton <akpm@osdl.org>,
serue@us.ibm.com, "Eric W. Biederman" <ebiederm@xmission.com>,
hpa@zytor.com, Containers <containers@lists.osdl.org>,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH]: Factor out PTY index allocation
Date: Thu, 17 Apr 2008 23:08:17 +0200 [thread overview]
Message-ID: <4807BC41.50406@gmail.com> (raw)
In-Reply-To: <20080416221723.GB7112@us.ibm.com>
On 04/17/2008 12:17 AM, sukadev@us.ibm.com wrote:
> We noticed this while working on pts namespaces and believe this might
> be an useful change even as we rework our pts/device namespace approach.
>
> ---
>
> From: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> Subject: [PATCH]: Factor out PTY index allocation
>
> Factor out the code used to allocate/free a pts index into new interfaces,
> devpts_new_index() and devpts_kill_index(). This localizes the external
> data structures used in managing the pts indices.
>
> Signed-off-by: Sukadev Bhattiprolu <sukadev@us.ibm.com>
> Signed-off-by: Serge Hallyn<serue@us.ibm.com>
> Signed-off-by: Matt Helsley<matthltc@us.ibm.com>
>
> ---
> drivers/char/tty_io.c | 40 ++++++----------------------------------
> fs/devpts/inode.c | 42 +++++++++++++++++++++++++++++++++++++++++-
> include/linux/devpts_fs.h | 4 ++++
> 3 files changed, 51 insertions(+), 35 deletions(-)
[...]
> Index: 2.6.25-rc8-mm2/drivers/char/tty_io.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/drivers/char/tty_io.c 2008-04-16 09:51:11.000000000 -0700
> +++ 2.6.25-rc8-mm2/drivers/char/tty_io.c 2008-04-16 09:51:15.000000000 -0700
> @@ -137,9 +136,6 @@ EXPORT_SYMBOL(tty_mutex);
>
> #ifdef CONFIG_UNIX98_PTYS
> extern struct tty_driver *ptm_driver; /* Unix98 pty masters; for /dev/ptmx */
> -extern int pty_limit; /* Config limit on Unix98 ptys */
> -static DEFINE_IDR(allocated_ptys);
> -static DEFINE_MUTEX(allocated_ptys_lock);
[...]
> Index: 2.6.25-rc8-mm2/fs/devpts/inode.c
> ===================================================================
> --- 2.6.25-rc8-mm2.orig/fs/devpts/inode.c 2008-02-27 15:17:59.000000000 -0800
> +++ 2.6.25-rc8-mm2/fs/devpts/inode.c 2008-04-16 09:51:15.000000000 -0700
> @@ -26,6 +27,10 @@
>
> #define DEVPTS_DEFAULT_MODE 0600
>
> +extern int pty_limit; /* Config limit on Unix98 ptys */
> +static DEFINE_IDR(allocated_ptys);
> +static DECLARE_MUTEX(allocated_ptys_lock);
Ugh, why mutex->semaphore conversion?
prev parent reply other threads:[~2008-04-17 21:08 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-04-16 22:17 [PATCH]: Factor out PTY index allocation sukadev
[not found] ` <20080416221723.GB7112-r/Jw6+rmf7HQT0dZR+AlfA@public.gmane.org>
2008-04-17 15:42 ` Serge E. Hallyn
2008-04-17 15:42 ` Serge E. Hallyn
2008-04-17 16:05 ` H. Peter Anvin
2008-04-17 21:17 ` Andrew Morton
2008-04-17 21:17 ` Andrew Morton
2008-04-17 23:53 ` Matthew Helsley
2008-04-17 21:08 ` Jiri Slaby [this message]
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=4807BC41.50406@gmail.com \
--to=jirislaby@gmail.com \
--cc=akpm@osdl.org \
--cc=containers@lists.osdl.org \
--cc=ebiederm@xmission.com \
--cc=hpa@zytor.com \
--cc=linux-kernel@vger.kernel.org \
--cc=serue@us.ibm.com \
--cc=sukadev@us.ibm.com \
/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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.