Lines Matching refs:sb

32 static int hfs_sync_fs(struct super_block *sb, int wait)  in hfs_sync_fs()  argument
34 hfs_mdb_commit(sb); in hfs_sync_fs()
45 static void hfs_put_super(struct super_block *sb) in hfs_put_super() argument
47 cancel_delayed_work_sync(&HFS_SB(sb)->mdb_work); in hfs_put_super()
48 hfs_mdb_close(sb); in hfs_put_super()
50 hfs_mdb_put(sb); in hfs_put_super()
56 struct super_block *sb; in flush_mdb() local
59 sb = sbi->sb; in flush_mdb()
65 hfs_mdb_commit(sb); in flush_mdb()
68 void hfs_mark_mdb_dirty(struct super_block *sb) in hfs_mark_mdb_dirty() argument
70 struct hfs_sb_info *sbi = HFS_SB(sb); in hfs_mark_mdb_dirty()
73 if (sb->s_flags & MS_RDONLY) in hfs_mark_mdb_dirty()
96 struct super_block *sb = dentry->d_sb; in hfs_statfs() local
97 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in hfs_statfs()
100 buf->f_bsize = sb->s_blocksize; in hfs_statfs()
101 buf->f_blocks = (u32)HFS_SB(sb)->fs_ablocks * HFS_SB(sb)->fs_div; in hfs_statfs()
102 buf->f_bfree = (u32)HFS_SB(sb)->free_ablocks * HFS_SB(sb)->fs_div; in hfs_statfs()
104 buf->f_files = HFS_SB(sb)->fs_ablocks; in hfs_statfs()
105 buf->f_ffree = HFS_SB(sb)->free_ablocks; in hfs_statfs()
113 static int hfs_remount(struct super_block *sb, int *flags, char *data) in hfs_remount() argument
115 sync_filesystem(sb); in hfs_remount()
117 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) in hfs_remount()
120 if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { in hfs_remount()
122 sb->s_flags |= MS_RDONLY; in hfs_remount()
124 } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { in hfs_remount()
126 sb->s_flags |= MS_RDONLY; in hfs_remount()
161 static struct inode *hfs_alloc_inode(struct super_block *sb) in hfs_alloc_inode() argument
384 static int hfs_fill_super(struct super_block *sb, void *data, int silent) in hfs_fill_super() argument
396 sbi->sb = sb; in hfs_fill_super()
397 sb->s_fs_info = sbi; in hfs_fill_super()
407 sb->s_op = &hfs_super_operations; in hfs_fill_super()
408 sb->s_flags |= MS_NODIRATIME; in hfs_fill_super()
411 res = hfs_mdb_get(sb); in hfs_fill_super()
415 hfs_mdb_name(sb)); in hfs_fill_super()
421 res = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_fill_super()
424 res = hfs_cat_find_brec(sb, HFS_ROOT_CNID, &fd); in hfs_fill_super()
437 root_inode = hfs_iget(sb, &fd.search_key->cat, &rec); in hfs_fill_super()
442 sb->s_d_op = &hfs_dentry_operations; in hfs_fill_super()
444 sb->s_root = d_make_root(root_inode); in hfs_fill_super()
445 if (!sb->s_root) in hfs_fill_super()
454 hfs_mdb_put(sb); in hfs_fill_super()