Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 347879
b: refs/heads/master
c: 81cc7fa
h: refs/heads/master
i:
  347877: eca449a
  347875: 8acf75d
  347871: fd68a11
v: v3
  • Loading branch information
Vyacheslav Dubeyko authored and Linus Torvalds committed Dec 21, 2012
1 parent b05e6c6 commit 47463cb
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 6 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 1b243fd39bd605cdfc482bba4e56b0cb34b28f27
refs/heads/master: 81cc7fad552bc9e4fa8c1f25becbecaaa1d41b67
5 changes: 3 additions & 2 deletions trunk/fs/hfsplus/btree.c
Original file line number Diff line number Diff line change
Expand Up @@ -159,7 +159,7 @@ void hfs_btree_close(struct hfs_btree *tree)
kfree(tree);
}

void hfs_btree_write(struct hfs_btree *tree)
int hfs_btree_write(struct hfs_btree *tree)
{
struct hfs_btree_header_rec *head;
struct hfs_bnode *node;
Expand All @@ -168,7 +168,7 @@ void hfs_btree_write(struct hfs_btree *tree)
node = hfs_bnode_find(tree, 0);
if (IS_ERR(node))
/* panic? */
return;
return -EIO;
/* Load the header */
page = node->page[0];
head = (struct hfs_btree_header_rec *)(kmap(page) +
Expand All @@ -186,6 +186,7 @@ void hfs_btree_write(struct hfs_btree *tree)
kunmap(page);
set_page_dirty(page);
hfs_bnode_put(node);
return 0;
}

static struct hfs_bnode *hfs_bmap_new_bmap(struct hfs_bnode *prev, u32 idx)
Expand Down
2 changes: 1 addition & 1 deletion trunk/fs/hfsplus/hfsplus_fs.h
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,7 @@ int hfsplus_block_free(struct super_block *, u32, u32);
/* btree.c */
struct hfs_btree *hfs_btree_open(struct super_block *, u32);
void hfs_btree_close(struct hfs_btree *);
void hfs_btree_write(struct hfs_btree *);
int hfs_btree_write(struct hfs_btree *);
struct hfs_bnode *hfs_bmap_alloc(struct hfs_btree *);
void hfs_bmap_free(struct hfs_bnode *);

Expand Down
10 changes: 8 additions & 2 deletions trunk/fs/hfsplus/super.c
Original file line number Diff line number Diff line change
Expand Up @@ -127,8 +127,14 @@ static int hfsplus_system_write_inode(struct inode *inode)
hfsplus_mark_mdb_dirty(inode->i_sb);
}
hfsplus_inode_write_fork(inode, fork);
if (tree)
hfs_btree_write(tree);
if (tree) {
int err = hfs_btree_write(tree);
if (err) {
printk(KERN_ERR "hfs: b-tree write err: %d, ino %lu\n",
err, inode->i_ino);
return err;
}
}
return 0;
}

Expand Down

0 comments on commit 47463cb

Please sign in to comment.