]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
vfs: switch ->show_stats to struct dentry *
authorAl Viro <viro@zeniv.linux.org.uk>
Fri, 9 Dec 2011 01:51:13 +0000 (20:51 -0500)
committerAl Viro <viro@zeniv.linux.org.uk>
Sat, 7 Jan 2012 04:16:54 +0000 (23:16 -0500)
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
drivers/staging/pohmelfs/inode.c
fs/cifs/cifsfs.c
fs/nfs/super.c
fs/proc_namespace.c
include/linux/fs.h

index 6c12516826ad6e90b48265d0b26355fa1d3031af..91ec29e112bc4d5db87d0a76b6562724e3498405 100644 (file)
@@ -1759,11 +1759,11 @@ err_out_exit:
        return err;
 }
 
-static int pohmelfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
+static int pohmelfs_show_stats(struct seq_file *m, struct dentry *root)
 {
        struct netfs_state *st;
        struct pohmelfs_ctl *ctl;
-       struct pohmelfs_sb *psb = POHMELFS_SB(mnt->mnt_sb);
+       struct pohmelfs_sb *psb = POHMELFS_SB(root->d_sb);
        struct pohmelfs_config *c;
 
        mutex_lock(&psb->state_lock);
index 5bb961c13c4ddbd1361e4fdb8270835c4cc74e86..0cb89dc6526cca587a3497eec2f76de2146c4bb4 100644 (file)
@@ -488,7 +488,7 @@ static void cifs_umount_begin(struct super_block *sb)
 }
 
 #ifdef CONFIG_CIFS_STATS2
-static int cifs_show_stats(struct seq_file *s, struct vfsmount *mnt)
+static int cifs_show_stats(struct seq_file *s, struct dentry *root)
 {
        /* BB FIXME */
        return 0;
index 0e6dd56a9f1e4e420a7b0eab861b18a6d74b8acf..dd74d3bc2eaaae7301cc2f25faee78d7a71e750e 100644 (file)
@@ -265,7 +265,7 @@ static int  nfs_statfs(struct dentry *, struct kstatfs *);
 static int  nfs_show_options(struct seq_file *, struct vfsmount *);
 static int  nfs_show_devname(struct seq_file *, struct vfsmount *);
 static int  nfs_show_path(struct seq_file *, struct vfsmount *);
-static int  nfs_show_stats(struct seq_file *, struct vfsmount *);
+static int  nfs_show_stats(struct seq_file *, struct dentry *);
 static struct dentry *nfs_fs_mount(struct file_system_type *,
                int, const char *, void *);
 static struct dentry *nfs_xdev_mount(struct file_system_type *fs_type,
@@ -785,10 +785,10 @@ static int nfs_show_path(struct seq_file *m, struct vfsmount *mnt)
 /*
  * Present statistical information for this VFS mountpoint
  */
-static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
+static int nfs_show_stats(struct seq_file *m, struct dentry *root)
 {
        int i, cpu;
-       struct nfs_server *nfss = NFS_SB(mnt->mnt_sb);
+       struct nfs_server *nfss = NFS_SB(root->d_sb);
        struct rpc_auth *auth = nfss->client->cl_auth;
        struct nfs_iostats totals = { };
 
@@ -798,10 +798,10 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt)
         * Display all mount option settings
         */
        seq_printf(m, "\n\topts:\t");
-       seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? "ro" : "rw");
-       seq_puts(m, mnt->mnt_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : "");
-       seq_puts(m, mnt->mnt_sb->s_flags & MS_NOATIME ? ",noatime" : "");
-       seq_puts(m, mnt->mnt_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : "");
+       seq_puts(m, root->d_sb->s_flags & MS_RDONLY ? "ro" : "rw");
+       seq_puts(m, root->d_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : "");
+       seq_puts(m, root->d_sb->s_flags & MS_NOATIME ? ",noatime" : "");
+       seq_puts(m, root->d_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : "");
        nfs_show_mount_options(m, nfss, 1);
 
        seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ);
index 9dcd9543ca12da3f388c6bcb2c703bc541b7a7d1..61a09a6364ba4d68b548f63971cc3239eb1462f6 100644 (file)
@@ -183,12 +183,13 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt)
 {
        struct mount *r = real_mount(mnt);
        struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt };
+       struct super_block *sb = mnt_path.dentry->d_sb;
        int err = 0;
 
        /* device */
-       if (mnt->mnt_sb->s_op->show_devname) {
+       if (sb->s_op->show_devname) {
                seq_puts(m, "device ");
-               err = mnt->mnt_sb->s_op->show_devname(m, mnt);
+               err = sb->s_op->show_devname(m, mnt);
        } else {
                if (r->mnt_devname) {
                        seq_puts(m, "device ");
@@ -204,13 +205,13 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt)
 
        /* file system type */
        seq_puts(m, "with fstype ");
-       show_type(m, mnt->mnt_sb);
+       show_type(m, sb);
 
        /* optional statistics */
-       if (mnt->mnt_sb->s_op->show_stats) {
+       if (sb->s_op->show_stats) {
                seq_putc(m, ' ');
                if (!err)
-                       err = mnt->mnt_sb->s_op->show_stats(m, mnt);
+                       err = sb->s_op->show_stats(m, mnt_path.dentry);
        }
 
        seq_putc(m, '\n');
index 659be7d82617c905a917ae4afb1ad52ab58a9929..b2e4b6f639e404c47eb275c1487f40b934da3121 100644 (file)
@@ -1675,7 +1675,7 @@ struct super_operations {
        int (*show_options)(struct seq_file *, struct vfsmount *);
        int (*show_devname)(struct seq_file *, struct vfsmount *);
        int (*show_path)(struct seq_file *, struct vfsmount *);
-       int (*show_stats)(struct seq_file *, struct vfsmount *);
+       int (*show_stats)(struct seq_file *, struct dentry *);
 #ifdef CONFIG_QUOTA
        ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t);
        ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t);