diff options
Diffstat (limited to 'fs/proc')
| -rw-r--r-- | fs/proc/base.c | 10 | ||||
| -rw-r--r-- | fs/proc/generic.c | 5 | ||||
| -rw-r--r-- | fs/proc/kmsg.c | 14 | ||||
| -rw-r--r-- | fs/proc/root.c | 6 |
4 files changed, 14 insertions, 21 deletions
diff --git a/fs/proc/base.c b/fs/proc/base.c index 623e2ffb5d2b..a7310841c831 100644 --- a/fs/proc/base.c +++ b/fs/proc/base.c | |||
| @@ -647,17 +647,11 @@ static int mounts_release(struct inode *inode, struct file *file) | |||
| 647 | static unsigned mounts_poll(struct file *file, poll_table *wait) | 647 | static unsigned mounts_poll(struct file *file, poll_table *wait) |
| 648 | { | 648 | { |
| 649 | struct proc_mounts *p = file->private_data; | 649 | struct proc_mounts *p = file->private_data; |
| 650 | struct mnt_namespace *ns = p->ns; | ||
| 651 | unsigned res = POLLIN | POLLRDNORM; | 650 | unsigned res = POLLIN | POLLRDNORM; |
| 652 | 651 | ||
| 653 | poll_wait(file, &ns->poll, wait); | 652 | poll_wait(file, &p->ns->poll, wait); |
| 654 | 653 | if (mnt_had_events(p)) | |
| 655 | spin_lock(&vfsmount_lock); | ||
| 656 | if (p->event != ns->event) { | ||
| 657 | p->event = ns->event; | ||
| 658 | res |= POLLERR | POLLPRI; | 654 | res |= POLLERR | POLLPRI; |
| 659 | } | ||
| 660 | spin_unlock(&vfsmount_lock); | ||
| 661 | 655 | ||
| 662 | return res; | 656 | return res; |
| 663 | } | 657 | } |
diff --git a/fs/proc/generic.c b/fs/proc/generic.c index 480cb1065eec..9580abeadeb3 100644 --- a/fs/proc/generic.c +++ b/fs/proc/generic.c | |||
| @@ -662,6 +662,7 @@ struct proc_dir_entry *proc_symlink(const char *name, | |||
| 662 | } | 662 | } |
| 663 | return ent; | 663 | return ent; |
| 664 | } | 664 | } |
| 665 | EXPORT_SYMBOL(proc_symlink); | ||
| 665 | 666 | ||
| 666 | struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, | 667 | struct proc_dir_entry *proc_mkdir_mode(const char *name, mode_t mode, |
| 667 | struct proc_dir_entry *parent) | 668 | struct proc_dir_entry *parent) |
| @@ -700,6 +701,7 @@ struct proc_dir_entry *proc_mkdir(const char *name, | |||
| 700 | { | 701 | { |
| 701 | return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent); | 702 | return proc_mkdir_mode(name, S_IRUGO | S_IXUGO, parent); |
| 702 | } | 703 | } |
| 704 | EXPORT_SYMBOL(proc_mkdir); | ||
| 703 | 705 | ||
| 704 | struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, | 706 | struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, |
| 705 | struct proc_dir_entry *parent) | 707 | struct proc_dir_entry *parent) |
| @@ -728,6 +730,7 @@ struct proc_dir_entry *create_proc_entry(const char *name, mode_t mode, | |||
| 728 | } | 730 | } |
| 729 | return ent; | 731 | return ent; |
| 730 | } | 732 | } |
| 733 | EXPORT_SYMBOL(create_proc_entry); | ||
| 731 | 734 | ||
| 732 | struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, | 735 | struct proc_dir_entry *proc_create_data(const char *name, mode_t mode, |
| 733 | struct proc_dir_entry *parent, | 736 | struct proc_dir_entry *parent, |
| @@ -762,6 +765,7 @@ out_free: | |||
| 762 | out: | 765 | out: |
| 763 | return NULL; | 766 | return NULL; |
| 764 | } | 767 | } |
| 768 | EXPORT_SYMBOL(proc_create_data); | ||
| 765 | 769 | ||
| 766 | static void free_proc_entry(struct proc_dir_entry *de) | 770 | static void free_proc_entry(struct proc_dir_entry *de) |
| 767 | { | 771 | { |
| @@ -853,3 +857,4 @@ continue_removing: | |||
| 853 | de->parent->name, de->name, de->subdir->name); | 857 | de->parent->name, de->name, de->subdir->name); |
| 854 | pde_put(de); | 858 | pde_put(de); |
| 855 | } | 859 | } |
| 860 | EXPORT_SYMBOL(remove_proc_entry); | ||
diff --git a/fs/proc/kmsg.c b/fs/proc/kmsg.c index 7ca78346d3f0..cfe90a48a6e8 100644 --- a/fs/proc/kmsg.c +++ b/fs/proc/kmsg.c | |||
| @@ -12,37 +12,37 @@ | |||
| 12 | #include <linux/poll.h> | 12 | #include <linux/poll.h> |
| 13 | #include <linux/proc_fs.h> | 13 | #include <linux/proc_fs.h> |
| 14 | #include <linux/fs.h> | 14 | #include <linux/fs.h> |
| 15 | #include <linux/syslog.h> | ||
| 15 | 16 | ||
| 16 | #include <asm/uaccess.h> | 17 | #include <asm/uaccess.h> |
| 17 | #include <asm/io.h> | 18 | #include <asm/io.h> |
| 18 | 19 | ||
| 19 | extern wait_queue_head_t log_wait; | 20 | extern wait_queue_head_t log_wait; |
| 20 | 21 | ||
| 21 | extern int do_syslog(int type, char __user *bug, int count); | ||
| 22 | |||
| 23 | static int kmsg_open(struct inode * inode, struct file * file) | 22 | static int kmsg_open(struct inode * inode, struct file * file) |
| 24 | { | 23 | { |
| 25 | return do_syslog(1,NULL,0); | 24 | return do_syslog(SYSLOG_ACTION_OPEN, NULL, 0, SYSLOG_FROM_FILE); |
| 26 | } | 25 | } |
| 27 | 26 | ||
| 28 | static int kmsg_release(struct inode * inode, struct file * file) | 27 | static int kmsg_release(struct inode * inode, struct file * file) |
| 29 | { | 28 | { |
| 30 | (void) do_syslog(0,NULL,0); | 29 | (void) do_syslog(SYSLOG_ACTION_CLOSE, NULL, 0, SYSLOG_FROM_FILE); |
| 31 | return 0; | 30 | return 0; |
| 32 | } | 31 | } |
| 33 | 32 | ||
| 34 | static ssize_t kmsg_read(struct file *file, char __user *buf, | 33 | static ssize_t kmsg_read(struct file *file, char __user *buf, |
| 35 | size_t count, loff_t *ppos) | 34 | size_t count, loff_t *ppos) |
| 36 | { | 35 | { |
| 37 | if ((file->f_flags & O_NONBLOCK) && !do_syslog(9, NULL, 0)) | 36 | if ((file->f_flags & O_NONBLOCK) && |
| 37 | !do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_FILE)) | ||
| 38 | return -EAGAIN; | 38 | return -EAGAIN; |
| 39 | return do_syslog(2, buf, count); | 39 | return do_syslog(SYSLOG_ACTION_READ, buf, count, SYSLOG_FROM_FILE); |
| 40 | } | 40 | } |
| 41 | 41 | ||
| 42 | static unsigned int kmsg_poll(struct file *file, poll_table *wait) | 42 | static unsigned int kmsg_poll(struct file *file, poll_table *wait) |
| 43 | { | 43 | { |
| 44 | poll_wait(file, &log_wait, wait); | 44 | poll_wait(file, &log_wait, wait); |
| 45 | if (do_syslog(9, NULL, 0)) | 45 | if (do_syslog(SYSLOG_ACTION_SIZE_UNREAD, NULL, 0, SYSLOG_FROM_FILE)) |
| 46 | return POLLIN | POLLRDNORM; | 46 | return POLLIN | POLLRDNORM; |
| 47 | return 0; | 47 | return 0; |
| 48 | } | 48 | } |
diff --git a/fs/proc/root.c b/fs/proc/root.c index b080b791d9e3..757c069f2a65 100644 --- a/fs/proc/root.c +++ b/fs/proc/root.c | |||
| @@ -220,9 +220,3 @@ void pid_ns_release_proc(struct pid_namespace *ns) | |||
| 220 | { | 220 | { |
| 221 | mntput(ns->proc_mnt); | 221 | mntput(ns->proc_mnt); |
| 222 | } | 222 | } |
| 223 | |||
| 224 | EXPORT_SYMBOL(proc_symlink); | ||
| 225 | EXPORT_SYMBOL(proc_mkdir); | ||
| 226 | EXPORT_SYMBOL(create_proc_entry); | ||
| 227 | EXPORT_SYMBOL(proc_create_data); | ||
| 228 | EXPORT_SYMBOL(remove_proc_entry); | ||
