]> git.proxmox.com Git - mirror_ubuntu-artful-kernel.git/blobdiff - fs/hfsplus/super.c
fs: push sync_filesystem() down to the file system's remount_fs()
[mirror_ubuntu-artful-kernel.git] / fs / hfsplus / super.c
index 4c4d142cf890a4cb7949467150d9aeb357fd6942..8eb787b52c058a607c10dca255232901d7a1a4de 100644 (file)
@@ -323,6 +323,7 @@ static int hfsplus_statfs(struct dentry *dentry, struct kstatfs *buf)
 
 static int hfsplus_remount(struct super_block *sb, int *flags, char *data)
 {
+       sync_filesystem(sb);
        if ((*flags & MS_RDONLY) == (sb->s_flags & MS_RDONLY))
                return 0;
        if (!(*flags & MS_RDONLY)) {
@@ -474,12 +475,14 @@ static int hfsplus_fill_super(struct super_block *sb, void *data, int silent)
                pr_err("failed to load catalog file\n");
                goto out_close_ext_tree;
        }
+       atomic_set(&sbi->attr_tree_state, HFSPLUS_EMPTY_ATTR_TREE);
        if (vhdr->attr_file.total_blocks != 0) {
                sbi->attr_tree = hfs_btree_open(sb, HFSPLUS_ATTR_CNID);
                if (!sbi->attr_tree) {
                        pr_err("failed to load attributes file\n");
                        goto out_close_cat_tree;
                }
+               atomic_set(&sbi->attr_tree_state, HFSPLUS_VALID_ATTR_TREE);
        }
        sb->s_xattr = hfsplus_xattr_handlers;