Lines Matching refs:sb
35 static int hfs_sync_fs(struct super_block *sb, int wait) in hfs_sync_fs() argument
37 is_hfs_cnid_counts_valid(sb); in hfs_sync_fs()
38 hfs_mdb_commit(sb); in hfs_sync_fs()
49 static void hfs_put_super(struct super_block *sb) in hfs_put_super() argument
51 cancel_delayed_work_sync(&HFS_SB(sb)->mdb_work); in hfs_put_super()
52 hfs_mdb_close(sb); in hfs_put_super()
54 hfs_mdb_put(sb); in hfs_put_super()
60 struct super_block *sb; in flush_mdb() local
63 sb = sbi->sb; in flush_mdb()
69 is_hfs_cnid_counts_valid(sb); in flush_mdb()
71 hfs_mdb_commit(sb); in flush_mdb()
74 void hfs_mark_mdb_dirty(struct super_block *sb) in hfs_mark_mdb_dirty() argument
76 struct hfs_sb_info *sbi = HFS_SB(sb); in hfs_mark_mdb_dirty()
79 if (sb_rdonly(sb)) in hfs_mark_mdb_dirty()
102 struct super_block *sb = dentry->d_sb; in hfs_statfs() local
103 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in hfs_statfs()
106 buf->f_bsize = sb->s_blocksize; in hfs_statfs()
107 buf->f_blocks = (u32)HFS_SB(sb)->fs_ablocks * HFS_SB(sb)->fs_div; in hfs_statfs()
108 buf->f_bfree = (u32)HFS_SB(sb)->free_ablocks * HFS_SB(sb)->fs_div; in hfs_statfs()
110 buf->f_files = HFS_SB(sb)->fs_ablocks; in hfs_statfs()
111 buf->f_ffree = HFS_SB(sb)->free_ablocks; in hfs_statfs()
120 struct super_block *sb = fc->root->d_sb; in hfs_reconfigure() local
122 sync_filesystem(sb); in hfs_reconfigure()
124 if ((bool)(fc->sb_flags & SB_RDONLY) == sb_rdonly(sb)) in hfs_reconfigure()
128 if (!(HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_UNMNT))) { in hfs_reconfigure()
130 sb->s_flags |= SB_RDONLY; in hfs_reconfigure()
132 } else if (HFS_SB(sb)->mdb->drAtrb & cpu_to_be16(HFS_SB_ATTRIB_SLOCK)) { in hfs_reconfigure()
134 sb->s_flags |= SB_RDONLY; in hfs_reconfigure()
169 static struct inode *hfs_alloc_inode(struct super_block *sb) in hfs_alloc_inode() argument
173 i = alloc_inode_sb(sb, hfs_inode_cachep, GFP_KERNEL); in hfs_alloc_inode()
316 static int hfs_fill_super(struct super_block *sb, struct fs_context *fc) in hfs_fill_super() argument
318 struct hfs_sb_info *sbi = HFS_SB(sb); in hfs_fill_super()
338 sbi->sb = sb; in hfs_fill_super()
339 sb->s_op = &hfs_super_operations; in hfs_fill_super()
340 sb->s_xattr = hfs_xattr_handlers; in hfs_fill_super()
341 sb->s_flags |= SB_NODIRATIME; in hfs_fill_super()
344 res = hfs_mdb_get(sb); in hfs_fill_super()
348 hfs_mdb_name(sb)); in hfs_fill_super()
354 res = hfs_find_init(HFS_SB(sb)->cat_tree, &fd); in hfs_fill_super()
357 res = hfs_cat_find_brec(sb, HFS_ROOT_CNID, &fd); in hfs_fill_super()
370 root_inode = hfs_iget(sb, &fd.search_key->cat, &rec); in hfs_fill_super()
375 set_default_d_op(sb, &hfs_dentry_operations); in hfs_fill_super()
377 sb->s_root = d_make_root(root_inode); in hfs_fill_super()
378 if (!sb->s_root) in hfs_fill_super()
389 hfs_mdb_put(sb); in hfs_fill_super()
437 static void hfs_kill_super(struct super_block *sb) in hfs_kill_super() argument
439 struct hfs_sb_info *hsb = HFS_SB(sb); in hfs_kill_super()
441 kill_block_super(sb); in hfs_kill_super()