From: Cyrill Gorcunov <gorcunov@gmail.com>
To: "Eric W. Biederman" <ebiederm@xmission.com>
Cc: Oleg Nesterov <oleg@redhat.com>,
Andrew Morton <akpm@linux-foundation.org>,
KOSAKI Motohiro <kosaki.motohiro@gmail.com>,
LKML <linux-kernel@vger.kernel.org>,
Pavel Emelyanov <xemul@parallels.com>,
Serge Hallyn <serge.hallyn@canonical.com>,
KAMEZAWA Hiroyuki <kamezawa.hiroyu@jp.fujitsu.com>,
Tejun Heo <tj@kernel.org>, Andrew Vagin <avagin@openvz.org>,
Vasiliy Kulikov <segoon@openwall.com>
Subject: Re: [PATCH] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v7
Date: Fri, 20 Jan 2012 10:31:26 +0400 [thread overview]
Message-ID: <20120120063126.GA1954@moon> (raw)
In-Reply-To: <m1ty3r1e0y.fsf@fess.ebiederm.org>
On Thu, Jan 19, 2012 at 03:14:05PM -0800, Eric W. Biederman wrote:
...
> >
> >> > +static int children_seq_show(struct seq_file *seq, void *v)
> >> > +{
> >> > + struct inode *inode = seq->private;
> >> > + unsigned long pid;
> >> > +
> >> > + pid = (unsigned long)pid_nr_ns(v, inode->i_sb->s_fs_info);
> >> > + return seq_printf(seq, " %lu", pid);
> >> > +}
> >>
> >> just noticed... why unsigned long and %lu? afaics pid_t/%d should work
> >> without any typecasts.
> >>
> >
> > I'm not sure how important it is, but Andrew mentioned in one of email
> > that we might be moving from pid_t from int to long one day (which of
> > course will require extreme huge work on checking code where int->long
> > transition might cause problems). So I thought why should I wait then?
> >
> > [ Andrew, am I correct? ]
>
> It is going to take a lot to get to a > 32bit pid value. I would not
> worry about it today unless there is some 64bit arch somewhere that defines
> pid_t as long.
>
Yeah, it seems I overdone here ;) I've sent updated version with pid_t.
Cyrill
prev parent reply other threads:[~2012-01-20 6:31 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-19 15:51 [PATCH] fs, proc: Introduce /proc/<pid>/task/<tid>/children entry v7 Cyrill Gorcunov
2012-01-19 17:47 ` Cyrill Gorcunov
2012-01-19 17:57 ` Oleg Nesterov
2012-01-19 18:09 ` Cyrill Gorcunov
2012-01-19 18:13 ` Cyrill Gorcunov
2012-01-20 15:01 ` Oleg Nesterov
2012-01-19 23:14 ` Eric W. Biederman
2012-01-20 6:31 ` Cyrill Gorcunov [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=20120120063126.GA1954@moon \
--to=gorcunov@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=avagin@openvz.org \
--cc=ebiederm@xmission.com \
--cc=kamezawa.hiroyu@jp.fujitsu.com \
--cc=kosaki.motohiro@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--cc=oleg@redhat.com \
--cc=segoon@openwall.com \
--cc=serge.hallyn@canonical.com \
--cc=tj@kernel.org \
--cc=xemul@parallels.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.