Merge branch 'locks' of git://linux-nfs.org/~bfields/linux
* 'locks' of git://linux-nfs.org/~bfields/linux: nfsd: remove IS_ISMNDLCK macro Rework /proc/locks via seq_files and seq_list helpers fs/locks.c: use list_for_each_entry() instead of list_for_each() NFS: clean up explicit check for mandatory locks AFS: clean up explicit check for mandatory locks 9PFS: clean up explicit check for mandatory locks GFS2: clean up explicit check for mandatory locks Cleanup macros for distinguishing mandatory locks Documentation: move locks.txt in filesystems/ locks: add warning about mandatory locking races Documentation: move mandatory locking documentation to filesystems/ locks: Fix potential OOPS in generic_setlease() Use list_first_entry in locks_wake_up_blocks locks: fix flock_lock_file() comment Memory shortage can result in inconsistent flocks state locks: kill redundant local variable locks: reverse order of posix_locks_conflict() arguments
This commit is contained in:
@ -66,7 +66,6 @@ extern int get_stram_list(char *);
|
||||
extern int get_filesystem_list(char *);
|
||||
extern int get_exec_domain_list(char *);
|
||||
extern int get_dma_list(char *);
|
||||
extern int get_locks_status (char *, char **, off_t, int);
|
||||
|
||||
static int proc_calc_metrics(char *page, char **start, off_t off,
|
||||
int count, int *eof, int len)
|
||||
@ -624,16 +623,18 @@ static int cmdline_read_proc(char *page, char **start, off_t off,
|
||||
return proc_calc_metrics(page, start, off, count, eof, len);
|
||||
}
|
||||
|
||||
static int locks_read_proc(char *page, char **start, off_t off,
|
||||
int count, int *eof, void *data)
|
||||
static int locks_open(struct inode *inode, struct file *filp)
|
||||
{
|
||||
int len = get_locks_status(page, start, off, count);
|
||||
|
||||
if (len < count)
|
||||
*eof = 1;
|
||||
return len;
|
||||
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 execdomains_read_proc(char *page, char **start, off_t off,
|
||||
int count, int *eof, void *data)
|
||||
{
|
||||
@ -691,7 +692,6 @@ void __init proc_misc_init(void)
|
||||
#endif
|
||||
{"filesystems", filesystems_read_proc},
|
||||
{"cmdline", cmdline_read_proc},
|
||||
{"locks", locks_read_proc},
|
||||
{"execdomains", execdomains_read_proc},
|
||||
{NULL,}
|
||||
};
|
||||
@ -709,6 +709,7 @@ void __init proc_misc_init(void)
|
||||
entry->proc_fops = &proc_kmsg_operations;
|
||||
}
|
||||
#endif
|
||||
create_seq_entry("locks", 0, &proc_locks_operations);
|
||||
create_seq_entry("devices", 0, &proc_devinfo_operations);
|
||||
create_seq_entry("cpuinfo", 0, &proc_cpuinfo_operations);
|
||||
#ifdef CONFIG_BLOCK
|
||||
|
Reference in New Issue
Block a user