Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
L
linux
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
linux
Commits
74e2e8e8
Commit
74e2e8e8
authored
Oct 06, 2008
by
Alexey Dobriyan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
proc: move /proc/pagetypeinfo boilerplate to mm/vmstat.c
Signed-off-by:
Alexey Dobriyan
<
adobriyan@gmail.com
>
parent
8f32f7e5
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
14 additions
and
15 deletions
+14
-15
fs/proc/proc_misc.c
fs/proc/proc_misc.c
+0
-13
include/linux/vmstat.h
include/linux/vmstat.h
+0
-1
mm/vmstat.c
mm/vmstat.c
+14
-1
No files found.
fs/proc/proc_misc.c
View file @
74e2e8e8
...
...
@@ -57,18 +57,6 @@
#include <asm/div64.h>
#include "internal.h"
static
int
pagetypeinfo_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
seq_open
(
file
,
&
pagetypeinfo_op
);
}
static
const
struct
file_operations
pagetypeinfo_file_ops
=
{
.
open
=
pagetypeinfo_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
};
static
int
zoneinfo_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
seq_open
(
file
,
&
zoneinfo_op
);
...
...
@@ -257,7 +245,6 @@ void __init proc_misc_init(void)
proc_symlink
(
"mounts"
,
NULL
,
"self/mounts"
);
/* And now for trickier ones */
proc_create
(
"pagetypeinfo"
,
S_IRUGO
,
NULL
,
&
pagetypeinfo_file_ops
);
proc_create
(
"vmstat"
,
S_IRUGO
,
NULL
,
&
proc_vmstat_file_operations
);
proc_create
(
"zoneinfo"
,
S_IRUGO
,
NULL
,
&
proc_zoneinfo_file_operations
);
#ifdef CONFIG_BLOCK
...
...
include/linux/vmstat.h
View file @
74e2e8e8
...
...
@@ -54,7 +54,6 @@ enum vm_event_item { PGPGIN, PGPGOUT, PSWPIN, PSWPOUT,
NR_VM_EVENT_ITEMS
};
extern
const
struct
seq_operations
pagetypeinfo_op
;
extern
const
struct
seq_operations
zoneinfo_op
;
extern
const
struct
seq_operations
vmstat_op
;
extern
int
sysctl_stat_interval
;
...
...
mm/vmstat.c
View file @
74e2e8e8
...
...
@@ -600,13 +600,25 @@ static const struct file_operations fragmentation_file_operations = {
.
release
=
seq_release
,
};
const
struct
seq_operations
pagetypeinfo_op
=
{
static
const
struct
seq_operations
pagetypeinfo_op
=
{
.
start
=
frag_start
,
.
next
=
frag_next
,
.
stop
=
frag_stop
,
.
show
=
pagetypeinfo_show
,
};
static
int
pagetypeinfo_open
(
struct
inode
*
inode
,
struct
file
*
file
)
{
return
seq_open
(
file
,
&
pagetypeinfo_op
);
}
static
const
struct
file_operations
pagetypeinfo_file_ops
=
{
.
open
=
pagetypeinfo_open
,
.
read
=
seq_read
,
.
llseek
=
seq_lseek
,
.
release
=
seq_release
,
};
#ifdef CONFIG_ZONE_DMA
#define TEXT_FOR_DMA(xx) xx "_dma",
#else
...
...
@@ -925,6 +937,7 @@ static int __init setup_vmstat(void)
#endif
#ifdef CONFIG_PROC_FS
proc_create
(
"buddyinfo"
,
S_IRUGO
,
NULL
,
&
fragmentation_file_operations
);
proc_create
(
"pagetypeinfo"
,
S_IRUGO
,
NULL
,
&
pagetypeinfo_file_ops
);
#endif
return
0
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment