From: Alexey Dobriyan <adobriyan@gmail.com>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-kernel@vger.kernel.org
Subject: Re: [PATCH] proc: make struct proc_dir_entry::namelen unsigned int
Date: Thu, 10 Mar 2011 01:22:33 +0200 [thread overview]
Message-ID: <20110309232233.GA24596@p183.telecom.by> (raw)
In-Reply-To: <20110309150306.90369913.akpm@linux-foundation.org>
On Wed, Mar 09, 2011 at 03:03:06PM -0800, Andrew Morton wrote:
> On Tue, 8 Mar 2011 12:54:28 +0200
> Alexey Dobriyan <adobriyan@gmail.com> wrote:
>
> > Space is not really conserved, because of natural alignment for the next field.
> > sizeof(struct proc_dir_entry) remains the same.
> >
>
> What is the reason for this patch??
1. namelen is declared "unsigned short" which hints for "maybe space savings".
Indeed in 2.4 struct proc_dir_entry looked like:
struct proc_dir_entry {
unsigned short low_ino;
unsigned short namelen;
Now, low_ino is "unsigned int", all savings were gone for a long time.
"struct proc_dir_entry" is not that countless to worry about it's size,
anyway.
2. converting from unsigned short to int/unsigned int can only create
problems, we better play it safe.
prev parent reply other threads:[~2011-03-09 23:22 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-08 10:54 Alexey Dobriyan
2011-03-09 23:03 ` Andrew Morton
2011-03-09 23:22 ` Alexey Dobriyan [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=20110309232233.GA24596@p183.telecom.by \
--to=adobriyan@gmail.com \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
/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
Powered by JetHome