Merge branch 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6

* 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs-2.6:
  [patch 7/7] vfs: mountinfo: show dominating group id
  [patch 6/7] vfs: mountinfo: add /proc/<pid>/mountinfo
  [patch 5/7] vfs: mountinfo: allow using process root
  [patch 4/7] vfs: mountinfo: add mount peer group ID
  [patch 3/7] vfs: mountinfo: add mount ID
  [patch 2/7] vfs: mountinfo: add seq_file_root()
  [patch 1/7] vfs: mountinfo: add dentry_path()
  [PATCH] remove unused label in xattr.c (noise from ro-bind)
This commit is contained in:
Linus Torvalds 2008-04-23 12:24:19 -07:00
commit 79c1cb7a8c
12 changed files with 573 additions and 138 deletions

View file

@ -301,7 +301,9 @@ extern int d_validate(struct dentry *, struct dentry *);
*/
extern char *dynamic_dname(struct dentry *, char *, int, const char *, ...);
extern char *__d_path(const struct path *path, struct path *root, char *, int);
extern char *d_path(struct path *, char *, int);
extern char *dentry_path(struct dentry *, char *, int);
/* Allocation counts.. */

View file

@ -5,6 +5,7 @@
#include <linux/mount.h>
#include <linux/sched.h>
#include <linux/nsproxy.h>
#include <linux/seq_file.h>
struct mnt_namespace {
atomic_t count;
@ -14,6 +15,13 @@ struct mnt_namespace {
int event;
};
struct proc_mounts {
struct seq_file m; /* must be the first element */
struct mnt_namespace *ns;
struct path root;
int event;
};
extern struct mnt_namespace *copy_mnt_ns(unsigned long, struct mnt_namespace *,
struct fs_struct *);
extern void __put_mnt_ns(struct mnt_namespace *ns);
@ -37,5 +45,9 @@ static inline void get_mnt_ns(struct mnt_namespace *ns)
atomic_inc(&ns->count);
}
extern const struct seq_operations mounts_op;
extern const struct seq_operations mountinfo_op;
extern const struct seq_operations mountstats_op;
#endif
#endif

View file

@ -56,6 +56,8 @@ struct vfsmount {
struct list_head mnt_slave; /* slave list entry */
struct vfsmount *mnt_master; /* slave is on master->mnt_slave_list */
struct mnt_namespace *mnt_ns; /* containing namespace */
int mnt_id; /* mount identifier */
int mnt_group_id; /* peer group identifier */
/*
* We put mnt_count & mnt_expiry_mark at the end of struct vfsmount
* to let these frequently modified fields in a separate cache line

View file

@ -10,6 +10,7 @@ struct seq_operations;
struct file;
struct path;
struct inode;
struct dentry;
struct seq_file {
char *buf;
@ -44,6 +45,9 @@ int seq_printf(struct seq_file *, const char *, ...)
__attribute__ ((format (printf,2,3)));
int seq_path(struct seq_file *, struct path *, char *);
int seq_dentry(struct seq_file *, struct dentry *, char *);
int seq_path_root(struct seq_file *m, struct path *path, struct path *root,
char *esc);
int single_open(struct file *, int (*)(struct seq_file *, void *), void *);
int single_release(struct inode *, struct file *);