diff options
Diffstat (limited to 'fs/hfsplus/super.c')
| -rw-r--r-- | fs/hfsplus/super.c | 8 | 
1 files changed, 6 insertions, 2 deletions
diff --git a/fs/hfsplus/super.c b/fs/hfsplus/super.c index 4c4d142cf89..4cf2024b87d 100644 --- a/fs/hfsplus/super.c +++ b/fs/hfsplus/super.c @@ -131,9 +131,10 @@ static int hfsplus_system_write_inode(struct inode *inode)  	hfsplus_inode_write_fork(inode, fork);  	if (tree) {  		int err = hfs_btree_write(tree); +  		if (err) {  			pr_err("b-tree write err: %d, ino %lu\n", -					err, inode->i_ino); +			       err, inode->i_ino);  			return err;  		}  	} @@ -161,7 +162,7 @@ static int hfsplus_write_inode(struct inode *inode,  static void hfsplus_evict_inode(struct inode *inode)  {  	hfs_dbg(INODE, "hfsplus_evict_inode: %lu\n", inode->i_ino); -	truncate_inode_pages(&inode->i_data, 0); +	truncate_inode_pages_final(&inode->i_data);  	clear_inode(inode);  	if (HFSPLUS_IS_RSRC(inode)) {  		HFSPLUS_I(HFSPLUS_I(inode)->rsrc_inode)->rsrc_inode = NULL; @@ -323,6 +324,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 +476,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;  | 
