aboutsummaryrefslogtreecommitdiffstats
path: root/fs/locks.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 15:04:37 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2008-10-23 15:04:37 -0400
commit88ed86fee6651033de9b7038dac7869a9f19775a (patch)
tree38b638d2e7cba110ec271275738f221feb7e0a37 /fs/locks.c
parent3856d30ded1fe43c6657927ebad402d25cd128f4 (diff)
parent59c7572e82d69483a66eaa67b46548baeb69ecf4 (diff)
Merge branch 'proc' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc
* 'proc' of git://git.kernel.org/pub/scm/linux/kernel/git/adobriyan/proc: (35 commits) proc: remove fs/proc/proc_misc.c proc: move /proc/vmcore creation to fs/proc/vmcore.c proc: move pagecount stuff to fs/proc/page.c proc: move all /proc/kcore stuff to fs/proc/kcore.c proc: move /proc/schedstat boilerplate to kernel/sched_stats.h proc: move /proc/modules boilerplate to kernel/module.c proc: move /proc/diskstats boilerplate to block/genhd.c proc: move /proc/zoneinfo boilerplate to mm/vmstat.c proc: move /proc/vmstat boilerplate to mm/vmstat.c proc: move /proc/pagetypeinfo boilerplate to mm/vmstat.c proc: move /proc/buddyinfo boilerplate to mm/vmstat.c proc: move /proc/vmallocinfo to mm/vmalloc.c proc: move /proc/slabinfo boilerplate to mm/slub.c, mm/slab.c proc: move /proc/slab_allocators boilerplate to mm/slab.c proc: move /proc/interrupts boilerplate code to fs/proc/interrupts.c proc: move /proc/stat to fs/proc/stat.c proc: move rest of /proc/partitions code to block/genhd.c proc: move /proc/cpuinfo code to fs/proc/cpuinfo.c proc: move /proc/devices code to fs/proc/devices.c proc: move rest of /proc/locks to fs/locks.c ...
Diffstat (limited to 'fs/locks.c')
-rw-r--r--fs/locks.c22
1 files changed, 21 insertions, 1 deletions
diff --git a/fs/locks.c b/fs/locks.c
index 20457486d6b2..09062e3ff104 100644
--- a/fs/locks.c
+++ b/fs/locks.c
@@ -2079,6 +2079,7 @@ int vfs_cancel_lock(struct file *filp, struct file_lock *fl)
2079EXPORT_SYMBOL_GPL(vfs_cancel_lock); 2079EXPORT_SYMBOL_GPL(vfs_cancel_lock);
2080 2080
2081#ifdef CONFIG_PROC_FS 2081#ifdef CONFIG_PROC_FS
2082#include <linux/proc_fs.h>
2082#include <linux/seq_file.h> 2083#include <linux/seq_file.h>
2083 2084
2084static void lock_get_status(struct seq_file *f, struct file_lock *fl, 2085static void lock_get_status(struct seq_file *f, struct file_lock *fl,
@@ -2184,12 +2185,31 @@ static void locks_stop(struct seq_file *f, void *v)
2184 unlock_kernel(); 2185 unlock_kernel();
2185} 2186}
2186 2187
2187struct seq_operations locks_seq_operations = { 2188static const struct seq_operations locks_seq_operations = {
2188 .start = locks_start, 2189 .start = locks_start,
2189 .next = locks_next, 2190 .next = locks_next,
2190 .stop = locks_stop, 2191 .stop = locks_stop,
2191 .show = locks_show, 2192 .show = locks_show,
2192}; 2193};
2194
2195static int locks_open(struct inode *inode, struct file *filp)
2196{
2197 return seq_open(filp, &locks_seq_operations);
2198}
2199
2200static const struct file_operations proc_locks_operations = {
2201 .open = locks_open,
2202 .read = seq_read,
2203 .llseek = seq_lseek,
2204 .release = seq_release,
2205};
2206
2207static int __init proc_locks_init(void)
2208{
2209 proc_create("locks", 0, NULL, &proc_locks_operations);
2210 return 0;
2211}
2212module_init(proc_locks_init);
2193#endif 2213#endif
2194 2214
2195/** 2215/**