Lines Matching refs:sb

19 static struct inode *hfsplus_alloc_inode(struct super_block *sb);
56 struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino) in hfsplus_iget() argument
62 inode = iget_locked(sb, ino); in hfsplus_iget()
173 static int hfsplus_sync_fs(struct super_block *sb, int wait) in hfsplus_sync_fs() argument
175 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_sync_fs()
219 error2 = hfsplus_submit_bio(sb, in hfsplus_sync_fs()
227 error2 = hfsplus_submit_bio(sb, in hfsplus_sync_fs()
237 blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL); in hfsplus_sync_fs()
258 void hfsplus_mark_mdb_dirty(struct super_block *sb) in hfsplus_mark_mdb_dirty() argument
260 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_mark_mdb_dirty()
263 if (sb->s_flags & MS_RDONLY) in hfsplus_mark_mdb_dirty()
275 static void hfsplus_put_super(struct super_block *sb) in hfsplus_put_super() argument
277 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_put_super()
283 if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) { in hfsplus_put_super()
290 hfsplus_sync_fs(sb, 1); in hfsplus_put_super()
301 kfree(sb->s_fs_info); in hfsplus_put_super()
302 sb->s_fs_info = NULL; in hfsplus_put_super()
307 struct super_block *sb = dentry->d_sb; in hfsplus_statfs() local
308 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_statfs()
309 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in hfsplus_statfs()
312 buf->f_bsize = sb->s_blocksize; in hfsplus_statfs()
325 static int hfsplus_remount(struct super_block *sb, int *flags, char *data) in hfsplus_remount() argument
327 sync_filesystem(sb); in hfsplus_remount()
328 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) in hfsplus_remount()
331 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr; in hfsplus_remount()
339 sb->s_flags |= MS_RDONLY; in hfsplus_remount()
346 sb->s_flags |= MS_RDONLY; in hfsplus_remount()
351 sb->s_flags |= MS_RDONLY; in hfsplus_remount()
370 static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) in hfsplus_fill_super() argument
387 sb->s_fs_info = sbi; in hfsplus_fill_super()
409 if (hfsplus_read_wrapper(sb)) { in hfsplus_fill_super()
417 sb->s_magic = HFSPLUS_VOLHEAD_SIG; in hfsplus_fill_super()
449 sb->s_op = &hfsplus_sops; in hfsplus_fill_super()
450 sb->s_maxbytes = MAX_LFS_FILESIZE; in hfsplus_fill_super()
454 sb->s_flags |= MS_RDONLY; in hfsplus_fill_super()
459 sb->s_flags |= MS_RDONLY; in hfsplus_fill_super()
461 !(sb->s_flags & MS_RDONLY)) { in hfsplus_fill_super()
463 sb->s_flags |= MS_RDONLY; in hfsplus_fill_super()
469 sbi->ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); in hfsplus_fill_super()
474 sbi->cat_tree = hfs_btree_open(sb, HFSPLUS_CAT_CNID); in hfsplus_fill_super()
481 sbi->attr_tree = hfs_btree_open(sb, HFSPLUS_ATTR_CNID); in hfsplus_fill_super()
488 sb->s_xattr = hfsplus_xattr_handlers; in hfsplus_fill_super()
490 inode = hfsplus_iget(sb, HFSPLUS_ALLOC_CNID); in hfsplus_fill_super()
499 root = hfsplus_iget(sb, HFSPLUS_ROOT_CNID); in hfsplus_fill_super()
506 sb->s_d_op = &hfsplus_dentry_operations; in hfsplus_fill_super()
507 sb->s_root = d_make_root(root); in hfsplus_fill_super()
508 if (!sb->s_root) { in hfsplus_fill_super()
518 err = hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_ROOT_CNID, &str); in hfsplus_fill_super()
525 inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id)); in hfsplus_fill_super()
534 if (!(sb->s_flags & MS_RDONLY)) { in hfsplus_fill_super()
544 hfsplus_sync_fs(sb, 1); in hfsplus_fill_super()
548 sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR); in hfsplus_fill_super()
589 dput(sb->s_root); in hfsplus_fill_super()
590 sb->s_root = NULL; in hfsplus_fill_super()
616 static struct inode *hfsplus_alloc_inode(struct super_block *sb) in hfsplus_alloc_inode() argument