mirror of
https://github.com/BobTheBlinker/android_kernel_motorola_sm6375.git
synced 2026-10-28 10:41:38 -04:00
proc: move rest of /proc/locks to fs/locks.c
Signed-off-by: Alexey Dobriyan <[email protected]>
This commit is contained in:
parent
ae048112c0
commit
d8ba7a3633
3 changed files with 21 additions and 19 deletions
22
fs/locks.c
22
fs/locks.c
|
|
@ -2078,6 +2078,7 @@ int vfs_cancel_lock(struct file *filp, struct file_lock *fl)
|
|||
EXPORT_SYMBOL_GPL(vfs_cancel_lock);
|
||||
|
||||
#ifdef CONFIG_PROC_FS
|
||||
#include <linux/proc_fs.h>
|
||||
#include <linux/seq_file.h>
|
||||
|
||||
static void lock_get_status(struct seq_file *f, struct file_lock *fl,
|
||||
|
|
@ -2183,12 +2184,31 @@ static void locks_stop(struct seq_file *f, void *v)
|
|||
unlock_kernel();
|
||||
}
|
||||
|
||||
struct seq_operations locks_seq_operations = {
|
||||
static const struct seq_operations locks_seq_operations = {
|
||||
.start = locks_start,
|
||||
.next = locks_next,
|
||||
.stop = locks_stop,
|
||||
.show = locks_show,
|
||||
};
|
||||
|
||||
static int locks_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
return seq_open(filp, &locks_seq_operations);
|
||||
}
|
||||
|
||||
static const struct file_operations proc_locks_operations = {
|
||||
.open = locks_open,
|
||||
.read = seq_read,
|
||||
.llseek = seq_lseek,
|
||||
.release = seq_release,
|
||||
};
|
||||
|
||||
static int __init proc_locks_init(void)
|
||||
{
|
||||
proc_create("locks", 0, NULL, &proc_locks_operations);
|
||||
return 0;
|
||||
}
|
||||
module_init(proc_locks_init);
|
||||
#endif
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in a new issue