aboutsummaryrefslogtreecommitdiffstats
path: root/fs/ocfs2/super.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/ocfs2/super.c')
-rw-r--r--fs/ocfs2/super.c22
1 files changed, 12 insertions, 10 deletions
diff --git a/fs/ocfs2/super.c b/fs/ocfs2/super.c
index 949b3dac30f1..cdf73393f094 100644
--- a/fs/ocfs2/super.c
+++ b/fs/ocfs2/super.c
@@ -100,7 +100,7 @@ static int ocfs2_initialize_mem_caches(void);
100static void ocfs2_free_mem_caches(void); 100static void ocfs2_free_mem_caches(void);
101static void ocfs2_delete_osb(struct ocfs2_super *osb); 101static void ocfs2_delete_osb(struct ocfs2_super *osb);
102 102
103static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf); 103static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf);
104 104
105static int ocfs2_sync_fs(struct super_block *sb, int wait); 105static int ocfs2_sync_fs(struct super_block *sb, int wait);
106 106
@@ -672,12 +672,14 @@ read_super_error:
672 return status; 672 return status;
673} 673}
674 674
675static struct super_block *ocfs2_get_sb(struct file_system_type *fs_type, 675static int ocfs2_get_sb(struct file_system_type *fs_type,
676 int flags, 676 int flags,
677 const char *dev_name, 677 const char *dev_name,
678 void *data) 678 void *data,
679 struct vfsmount *mnt)
679{ 680{
680 return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super); 681 return get_sb_bdev(fs_type, flags, dev_name, data, ocfs2_fill_super,
682 mnt);
681} 683}
682 684
683static struct file_system_type ocfs2_fs_type = { 685static struct file_system_type ocfs2_fs_type = {
@@ -855,7 +857,7 @@ static void ocfs2_put_super(struct super_block *sb)
855 mlog_exit_void(); 857 mlog_exit_void();
856} 858}
857 859
858static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf) 860static int ocfs2_statfs(struct dentry *dentry, struct kstatfs *buf)
859{ 861{
860 struct ocfs2_super *osb; 862 struct ocfs2_super *osb;
861 u32 numbits, freebits; 863 u32 numbits, freebits;
@@ -864,9 +866,9 @@ static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
864 struct buffer_head *bh = NULL; 866 struct buffer_head *bh = NULL;
865 struct inode *inode = NULL; 867 struct inode *inode = NULL;
866 868
867 mlog_entry("(%p, %p)\n", sb, buf); 869 mlog_entry("(%p, %p)\n", dentry->d_sb, buf);
868 870
869 osb = OCFS2_SB(sb); 871 osb = OCFS2_SB(dentry->d_sb);
870 872
871 inode = ocfs2_get_system_file_inode(osb, 873 inode = ocfs2_get_system_file_inode(osb,
872 GLOBAL_BITMAP_SYSTEM_INODE, 874 GLOBAL_BITMAP_SYSTEM_INODE,
@@ -889,7 +891,7 @@ static int ocfs2_statfs(struct super_block *sb, struct kstatfs *buf)
889 freebits = numbits - le32_to_cpu(bm_lock->id1.bitmap1.i_used); 891 freebits = numbits - le32_to_cpu(bm_lock->id1.bitmap1.i_used);
890 892
891 buf->f_type = OCFS2_SUPER_MAGIC; 893 buf->f_type = OCFS2_SUPER_MAGIC;
892 buf->f_bsize = sb->s_blocksize; 894 buf->f_bsize = dentry->d_sb->s_blocksize;
893 buf->f_namelen = OCFS2_MAX_FILENAME_LEN; 895 buf->f_namelen = OCFS2_MAX_FILENAME_LEN;
894 buf->f_blocks = ((sector_t) numbits) * 896 buf->f_blocks = ((sector_t) numbits) *
895 (osb->s_clustersize >> osb->sb->s_blocksize_bits); 897 (osb->s_clustersize >> osb->sb->s_blocksize_bits);