Commit 63c6764c authored by Yoshinori Sato's avatar Yoshinori Sato Committed by Linus Torvalds

[PATCH] nommu build error fix

"proc_smaps_operations" is not defined in case of "CONFIG_MMU=n".
Signed-off-by: default avatarYoshinori Sato <ysato@users.sourceforge.jp>
Signed-off-by: default avatarAndrew Morton <akpm@osdl.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 2d1f87a7
...@@ -103,7 +103,9 @@ enum pid_directory_inos { ...@@ -103,7 +103,9 @@ enum pid_directory_inos {
PROC_TGID_NUMA_MAPS, PROC_TGID_NUMA_MAPS,
PROC_TGID_MOUNTS, PROC_TGID_MOUNTS,
PROC_TGID_WCHAN, PROC_TGID_WCHAN,
#ifdef CONFIG_MMU
PROC_TGID_SMAPS, PROC_TGID_SMAPS,
#endif
#ifdef CONFIG_SCHEDSTATS #ifdef CONFIG_SCHEDSTATS
PROC_TGID_SCHEDSTAT, PROC_TGID_SCHEDSTAT,
#endif #endif
...@@ -141,7 +143,9 @@ enum pid_directory_inos { ...@@ -141,7 +143,9 @@ enum pid_directory_inos {
PROC_TID_NUMA_MAPS, PROC_TID_NUMA_MAPS,
PROC_TID_MOUNTS, PROC_TID_MOUNTS,
PROC_TID_WCHAN, PROC_TID_WCHAN,
#ifdef CONFIG_MMU
PROC_TID_SMAPS, PROC_TID_SMAPS,
#endif
#ifdef CONFIG_SCHEDSTATS #ifdef CONFIG_SCHEDSTATS
PROC_TID_SCHEDSTAT, PROC_TID_SCHEDSTAT,
#endif #endif
...@@ -195,7 +199,9 @@ static struct pid_entry tgid_base_stuff[] = { ...@@ -195,7 +199,9 @@ static struct pid_entry tgid_base_stuff[] = {
E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO), E(PROC_TGID_ROOT, "root", S_IFLNK|S_IRWXUGO),
E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO), E(PROC_TGID_EXE, "exe", S_IFLNK|S_IRWXUGO),
E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO), E(PROC_TGID_MOUNTS, "mounts", S_IFREG|S_IRUGO),
#ifdef CONFIG_MMU
E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO), E(PROC_TGID_SMAPS, "smaps", S_IFREG|S_IRUGO),
#endif
#ifdef CONFIG_SECURITY #ifdef CONFIG_SECURITY
E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), E(PROC_TGID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO),
#endif #endif
...@@ -235,7 +241,9 @@ static struct pid_entry tid_base_stuff[] = { ...@@ -235,7 +241,9 @@ static struct pid_entry tid_base_stuff[] = {
E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO), E(PROC_TID_ROOT, "root", S_IFLNK|S_IRWXUGO),
E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO), E(PROC_TID_EXE, "exe", S_IFLNK|S_IRWXUGO),
E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO), E(PROC_TID_MOUNTS, "mounts", S_IFREG|S_IRUGO),
#ifdef CONFIG_MMU
E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO), E(PROC_TID_SMAPS, "smaps", S_IFREG|S_IRUGO),
#endif
#ifdef CONFIG_SECURITY #ifdef CONFIG_SECURITY
E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO), E(PROC_TID_ATTR, "attr", S_IFDIR|S_IRUGO|S_IXUGO),
#endif #endif
...@@ -630,6 +638,7 @@ static struct file_operations proc_numa_maps_operations = { ...@@ -630,6 +638,7 @@ static struct file_operations proc_numa_maps_operations = {
}; };
#endif #endif
#ifdef CONFIG_MMU
extern struct seq_operations proc_pid_smaps_op; extern struct seq_operations proc_pid_smaps_op;
static int smaps_open(struct inode *inode, struct file *file) static int smaps_open(struct inode *inode, struct file *file)
{ {
...@@ -648,6 +657,7 @@ static struct file_operations proc_smaps_operations = { ...@@ -648,6 +657,7 @@ static struct file_operations proc_smaps_operations = {
.llseek = seq_lseek, .llseek = seq_lseek,
.release = seq_release, .release = seq_release,
}; };
#endif
extern struct seq_operations mounts_op; extern struct seq_operations mounts_op;
static int mounts_open(struct inode *inode, struct file *file) static int mounts_open(struct inode *inode, struct file *file)
...@@ -1681,10 +1691,12 @@ static struct dentry *proc_pident_lookup(struct inode *dir, ...@@ -1681,10 +1691,12 @@ static struct dentry *proc_pident_lookup(struct inode *dir,
case PROC_TGID_MOUNTS: case PROC_TGID_MOUNTS:
inode->i_fop = &proc_mounts_operations; inode->i_fop = &proc_mounts_operations;
break; break;
#ifdef CONFIG_MMU
case PROC_TID_SMAPS: case PROC_TID_SMAPS:
case PROC_TGID_SMAPS: case PROC_TGID_SMAPS:
inode->i_fop = &proc_smaps_operations; inode->i_fop = &proc_smaps_operations;
break; break;
#endif
#ifdef CONFIG_SECURITY #ifdef CONFIG_SECURITY
case PROC_TID_ATTR: case PROC_TID_ATTR:
inode->i_nlink = 2; inode->i_nlink = 2;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment