Lines Matching refs:sb

20 static struct inode *hfsplus_alloc_inode(struct super_block *sb);
57 struct inode *hfsplus_iget(struct super_block *sb, unsigned long ino) in hfsplus_iget() argument
63 inode = iget_locked(sb, ino); in hfsplus_iget()
174 static int hfsplus_sync_fs(struct super_block *sb, int wait) in hfsplus_sync_fs() argument
176 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_sync_fs()
220 error2 = hfsplus_submit_bio(sb, in hfsplus_sync_fs()
228 error2 = hfsplus_submit_bio(sb, in hfsplus_sync_fs()
238 blkdev_issue_flush(sb->s_bdev, GFP_KERNEL, NULL); in hfsplus_sync_fs()
259 void hfsplus_mark_mdb_dirty(struct super_block *sb) in hfsplus_mark_mdb_dirty() argument
261 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_mark_mdb_dirty()
264 if (sb->s_flags & MS_RDONLY) in hfsplus_mark_mdb_dirty()
276 static void hfsplus_put_super(struct super_block *sb) in hfsplus_put_super() argument
278 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_put_super()
284 if (!(sb->s_flags & MS_RDONLY) && sbi->s_vhdr) { in hfsplus_put_super()
291 hfsplus_sync_fs(sb, 1); in hfsplus_put_super()
302 kfree(sb->s_fs_info); in hfsplus_put_super()
303 sb->s_fs_info = NULL; in hfsplus_put_super()
308 struct super_block *sb = dentry->d_sb; in hfsplus_statfs() local
309 struct hfsplus_sb_info *sbi = HFSPLUS_SB(sb); in hfsplus_statfs()
310 u64 id = huge_encode_dev(sb->s_bdev->bd_dev); in hfsplus_statfs()
313 buf->f_bsize = sb->s_blocksize; in hfsplus_statfs()
326 static int hfsplus_remount(struct super_block *sb, int *flags, char *data) in hfsplus_remount() argument
328 sync_filesystem(sb); in hfsplus_remount()
329 if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY)) in hfsplus_remount()
332 struct hfsplus_vh *vhdr = HFSPLUS_SB(sb)->s_vhdr; in hfsplus_remount()
340 sb->s_flags |= MS_RDONLY; in hfsplus_remount()
347 sb->s_flags |= MS_RDONLY; in hfsplus_remount()
352 sb->s_flags |= MS_RDONLY; in hfsplus_remount()
371 static int hfsplus_fill_super(struct super_block *sb, void *data, int silent) in hfsplus_fill_super() argument
388 sb->s_fs_info = sbi; in hfsplus_fill_super()
410 if (hfsplus_read_wrapper(sb)) { in hfsplus_fill_super()
418 sb->s_magic = HFSPLUS_VOLHEAD_SIG; in hfsplus_fill_super()
450 sb->s_op = &hfsplus_sops; in hfsplus_fill_super()
451 sb->s_maxbytes = MAX_LFS_FILESIZE; in hfsplus_fill_super()
455 sb->s_flags |= MS_RDONLY; in hfsplus_fill_super()
460 sb->s_flags |= MS_RDONLY; in hfsplus_fill_super()
462 !(sb->s_flags & MS_RDONLY)) { in hfsplus_fill_super()
464 sb->s_flags |= MS_RDONLY; in hfsplus_fill_super()
470 sbi->ext_tree = hfs_btree_open(sb, HFSPLUS_EXT_CNID); in hfsplus_fill_super()
475 sbi->cat_tree = hfs_btree_open(sb, HFSPLUS_CAT_CNID); in hfsplus_fill_super()
482 sbi->attr_tree = hfs_btree_open(sb, HFSPLUS_ATTR_CNID); in hfsplus_fill_super()
489 sb->s_xattr = hfsplus_xattr_handlers; in hfsplus_fill_super()
491 inode = hfsplus_iget(sb, HFSPLUS_ALLOC_CNID); in hfsplus_fill_super()
500 root = hfsplus_iget(sb, HFSPLUS_ROOT_CNID); in hfsplus_fill_super()
507 sb->s_d_op = &hfsplus_dentry_operations; in hfsplus_fill_super()
508 sb->s_root = d_make_root(root); in hfsplus_fill_super()
509 if (!sb->s_root) { in hfsplus_fill_super()
519 err = hfsplus_cat_build_key(sb, fd.search_key, HFSPLUS_ROOT_CNID, &str); in hfsplus_fill_super()
526 inode = hfsplus_iget(sb, be32_to_cpu(entry.folder.id)); in hfsplus_fill_super()
535 if (!(sb->s_flags & MS_RDONLY)) { in hfsplus_fill_super()
545 hfsplus_sync_fs(sb, 1); in hfsplus_fill_super()
549 sbi->hidden_dir = hfsplus_new_inode(sb, S_IFDIR); in hfsplus_fill_super()
590 dput(sb->s_root); in hfsplus_fill_super()
591 sb->s_root = NULL; in hfsplus_fill_super()
617 static struct inode *hfsplus_alloc_inode(struct super_block *sb) in hfsplus_alloc_inode() argument