summaryrefslogtreecommitdiffstats
path: root/include/linux/proc_fs.h
diff options
context:
space:
mode:
authorAlexey Dobriyan <adobriyan@gmail.com>2011-03-23 16:42:52 -0700
committerLinus Torvalds <torvalds@linux-foundation.org>2011-03-23 19:46:37 -0700
commit312ec7e50c4d3f40b3762af651d1aa79a67f556a (patch)
tree98112d9c80aacd011e313268b5f5d8caf5b5b727 /include/linux/proc_fs.h
parentfc3d8767b2b6de955579852d7a150f1734265eaf (diff)
downloadlinux-312ec7e50c4d3f40b3762af651d1aa79a67f556a.tar.gz
linux-312ec7e50c4d3f40b3762af651d1aa79a67f556a.tar.bz2
linux-312ec7e50c4d3f40b3762af651d1aa79a67f556a.zip
proc: make struct proc_dir_entry::namelen unsigned int
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. Space is not really conserved, because of natural alignment for the next field. sizeof(struct proc_dir_entry) remains the same. Signed-off-by: Alexey Dobriyan <adobriyan@gmail.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'include/linux/proc_fs.h')
-rw-r--r--include/linux/proc_fs.h2
1 files changed, 1 insertions, 1 deletions
diff --git a/include/linux/proc_fs.h b/include/linux/proc_fs.h
index 379eaed72d4b..838c1149251a 100644
--- a/include/linux/proc_fs.h
+++ b/include/linux/proc_fs.h
@@ -50,7 +50,7 @@ typedef int (write_proc_t)(struct file *file, const char __user *buffer,
struct proc_dir_entry {
unsigned int low_ino;
- unsigned short namelen;
+ unsigned int namelen;
const char *name;
mode_t mode;
nlink_t nlink;