hfsplus: rework processing of hfs_btree_write() returned error
Add to hfs_btree_write() a return of -EIO on failure of b-tree node searching. Also add logic ofor processing errors from hfs_btree_write() in hfsplus_system_write_inode() with a message about b-tree writing failure. [akpm@linux-foundation.org: reduce scope of `err', print errno on error] Signed-off-by: Vyacheslav Dubeyko <slava@dubeyko.com> Cc: Christoph Hellwig <hch@infradead.org> Cc: Al Viro <viro@zeniv.linux.org.uk> Acked-by: Hin-Tak Leung <htl10@users.sourceforge.net> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
This commit is contained in:
committed by
Linus Torvalds
parent
1b243fd39b
commit
81cc7fad55
+8
-2
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user