diff options
author | Al Viro <viro@zeniv.linux.org.uk> | 2011-12-08 20:51:13 -0500 |
---|---|---|
committer | Al Viro <viro@zeniv.linux.org.uk> | 2012-01-06 23:16:54 -0500 |
commit | 64132379d509184425672e0dce1ac0a031e3f2a5 (patch) | |
tree | 2b7191e0e37bf061b2000935c7cf78e6fb1f3c95 | |
parent | cdcf116d44e78c7216ba9f8be9af1cdfca7af728 (diff) |
vfs: switch ->show_stats to struct dentry *
Signed-off-by: Al Viro <viro@zeniv.linux.org.uk>
-rw-r--r-- | drivers/staging/pohmelfs/inode.c | 4 | ||||
-rw-r--r-- | fs/cifs/cifsfs.c | 2 | ||||
-rw-r--r-- | fs/nfs/super.c | 14 | ||||
-rw-r--r-- | fs/proc_namespace.c | 11 | ||||
-rw-r--r-- | include/linux/fs.h | 2 |
5 files changed, 17 insertions, 16 deletions
diff --git a/drivers/staging/pohmelfs/inode.c b/drivers/staging/pohmelfs/inode.c index 6c12516826ad..91ec29e112bc 100644 --- a/drivers/staging/pohmelfs/inode.c +++ b/drivers/staging/pohmelfs/inode.c | |||
@@ -1759,11 +1759,11 @@ err_out_exit: | |||
1759 | return err; | 1759 | return err; |
1760 | } | 1760 | } |
1761 | 1761 | ||
1762 | static int pohmelfs_show_stats(struct seq_file *m, struct vfsmount *mnt) | 1762 | static int pohmelfs_show_stats(struct seq_file *m, struct dentry *root) |
1763 | { | 1763 | { |
1764 | struct netfs_state *st; | 1764 | struct netfs_state *st; |
1765 | struct pohmelfs_ctl *ctl; | 1765 | struct pohmelfs_ctl *ctl; |
1766 | struct pohmelfs_sb *psb = POHMELFS_SB(mnt->mnt_sb); | 1766 | struct pohmelfs_sb *psb = POHMELFS_SB(root->d_sb); |
1767 | struct pohmelfs_config *c; | 1767 | struct pohmelfs_config *c; |
1768 | 1768 | ||
1769 | mutex_lock(&psb->state_lock); | 1769 | mutex_lock(&psb->state_lock); |
diff --git a/fs/cifs/cifsfs.c b/fs/cifs/cifsfs.c index 5bb961c13c4d..0cb89dc6526c 100644 --- a/fs/cifs/cifsfs.c +++ b/fs/cifs/cifsfs.c | |||
@@ -488,7 +488,7 @@ static void cifs_umount_begin(struct super_block *sb) | |||
488 | } | 488 | } |
489 | 489 | ||
490 | #ifdef CONFIG_CIFS_STATS2 | 490 | #ifdef CONFIG_CIFS_STATS2 |
491 | static int cifs_show_stats(struct seq_file *s, struct vfsmount *mnt) | 491 | static int cifs_show_stats(struct seq_file *s, struct dentry *root) |
492 | { | 492 | { |
493 | /* BB FIXME */ | 493 | /* BB FIXME */ |
494 | return 0; | 494 | return 0; |
diff --git a/fs/nfs/super.c b/fs/nfs/super.c index 0e6dd56a9f1e..dd74d3bc2eaa 100644 --- a/fs/nfs/super.c +++ b/fs/nfs/super.c | |||
@@ -265,7 +265,7 @@ static int nfs_statfs(struct dentry *, struct kstatfs *); | |||
265 | static int nfs_show_options(struct seq_file *, struct vfsmount *); | 265 | static int nfs_show_options(struct seq_file *, struct vfsmount *); |
266 | static int nfs_show_devname(struct seq_file *, struct vfsmount *); | 266 | static int nfs_show_devname(struct seq_file *, struct vfsmount *); |
267 | static int nfs_show_path(struct seq_file *, struct vfsmount *); | 267 | static int nfs_show_path(struct seq_file *, struct vfsmount *); |
268 | static int nfs_show_stats(struct seq_file *, struct vfsmount *); | 268 | static int nfs_show_stats(struct seq_file *, struct dentry *); |
269 | static struct dentry *nfs_fs_mount(struct file_system_type *, | 269 | static struct dentry *nfs_fs_mount(struct file_system_type *, |
270 | int, const char *, void *); | 270 | int, const char *, void *); |
271 | static struct dentry *nfs_xdev_mount(struct file_system_type *fs_type, | 271 | 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) | |||
785 | /* | 785 | /* |
786 | * Present statistical information for this VFS mountpoint | 786 | * Present statistical information for this VFS mountpoint |
787 | */ | 787 | */ |
788 | static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) | 788 | static int nfs_show_stats(struct seq_file *m, struct dentry *root) |
789 | { | 789 | { |
790 | int i, cpu; | 790 | int i, cpu; |
791 | struct nfs_server *nfss = NFS_SB(mnt->mnt_sb); | 791 | struct nfs_server *nfss = NFS_SB(root->d_sb); |
792 | struct rpc_auth *auth = nfss->client->cl_auth; | 792 | struct rpc_auth *auth = nfss->client->cl_auth; |
793 | struct nfs_iostats totals = { }; | 793 | struct nfs_iostats totals = { }; |
794 | 794 | ||
@@ -798,10 +798,10 @@ static int nfs_show_stats(struct seq_file *m, struct vfsmount *mnt) | |||
798 | * Display all mount option settings | 798 | * Display all mount option settings |
799 | */ | 799 | */ |
800 | seq_printf(m, "\n\topts:\t"); | 800 | seq_printf(m, "\n\topts:\t"); |
801 | seq_puts(m, mnt->mnt_sb->s_flags & MS_RDONLY ? "ro" : "rw"); | 801 | seq_puts(m, root->d_sb->s_flags & MS_RDONLY ? "ro" : "rw"); |
802 | seq_puts(m, mnt->mnt_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); | 802 | seq_puts(m, root->d_sb->s_flags & MS_SYNCHRONOUS ? ",sync" : ""); |
803 | seq_puts(m, mnt->mnt_sb->s_flags & MS_NOATIME ? ",noatime" : ""); | 803 | seq_puts(m, root->d_sb->s_flags & MS_NOATIME ? ",noatime" : ""); |
804 | seq_puts(m, mnt->mnt_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); | 804 | seq_puts(m, root->d_sb->s_flags & MS_NODIRATIME ? ",nodiratime" : ""); |
805 | nfs_show_mount_options(m, nfss, 1); | 805 | nfs_show_mount_options(m, nfss, 1); |
806 | 806 | ||
807 | seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); | 807 | seq_printf(m, "\n\tage:\t%lu", (jiffies - nfss->mount_time) / HZ); |
diff --git a/fs/proc_namespace.c b/fs/proc_namespace.c index 9dcd9543ca12..61a09a6364ba 100644 --- a/fs/proc_namespace.c +++ b/fs/proc_namespace.c | |||
@@ -183,12 +183,13 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt) | |||
183 | { | 183 | { |
184 | struct mount *r = real_mount(mnt); | 184 | struct mount *r = real_mount(mnt); |
185 | struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; | 185 | struct path mnt_path = { .dentry = mnt->mnt_root, .mnt = mnt }; |
186 | struct super_block *sb = mnt_path.dentry->d_sb; | ||
186 | int err = 0; | 187 | int err = 0; |
187 | 188 | ||
188 | /* device */ | 189 | /* device */ |
189 | if (mnt->mnt_sb->s_op->show_devname) { | 190 | if (sb->s_op->show_devname) { |
190 | seq_puts(m, "device "); | 191 | seq_puts(m, "device "); |
191 | err = mnt->mnt_sb->s_op->show_devname(m, mnt); | 192 | err = sb->s_op->show_devname(m, mnt); |
192 | } else { | 193 | } else { |
193 | if (r->mnt_devname) { | 194 | if (r->mnt_devname) { |
194 | seq_puts(m, "device "); | 195 | seq_puts(m, "device "); |
@@ -204,13 +205,13 @@ static int show_vfsstat(struct seq_file *m, struct vfsmount *mnt) | |||
204 | 205 | ||
205 | /* file system type */ | 206 | /* file system type */ |
206 | seq_puts(m, "with fstype "); | 207 | seq_puts(m, "with fstype "); |
207 | show_type(m, mnt->mnt_sb); | 208 | show_type(m, sb); |
208 | 209 | ||
209 | /* optional statistics */ | 210 | /* optional statistics */ |
210 | if (mnt->mnt_sb->s_op->show_stats) { | 211 | if (sb->s_op->show_stats) { |
211 | seq_putc(m, ' '); | 212 | seq_putc(m, ' '); |
212 | if (!err) | 213 | if (!err) |
213 | err = mnt->mnt_sb->s_op->show_stats(m, mnt); | 214 | err = sb->s_op->show_stats(m, mnt_path.dentry); |
214 | } | 215 | } |
215 | 216 | ||
216 | seq_putc(m, '\n'); | 217 | seq_putc(m, '\n'); |
diff --git a/include/linux/fs.h b/include/linux/fs.h index 659be7d82617..b2e4b6f639e4 100644 --- a/include/linux/fs.h +++ b/include/linux/fs.h | |||
@@ -1675,7 +1675,7 @@ struct super_operations { | |||
1675 | int (*show_options)(struct seq_file *, struct vfsmount *); | 1675 | int (*show_options)(struct seq_file *, struct vfsmount *); |
1676 | int (*show_devname)(struct seq_file *, struct vfsmount *); | 1676 | int (*show_devname)(struct seq_file *, struct vfsmount *); |
1677 | int (*show_path)(struct seq_file *, struct vfsmount *); | 1677 | int (*show_path)(struct seq_file *, struct vfsmount *); |
1678 | int (*show_stats)(struct seq_file *, struct vfsmount *); | 1678 | int (*show_stats)(struct seq_file *, struct dentry *); |
1679 | #ifdef CONFIG_QUOTA | 1679 | #ifdef CONFIG_QUOTA |
1680 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); | 1680 | ssize_t (*quota_read)(struct super_block *, int, char *, size_t, loff_t); |
1681 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); | 1681 | ssize_t (*quota_write)(struct super_block *, int, const char *, size_t, loff_t); |