Skip to content

Commit

Permalink
Btrfs: return error of btrfs_update_inode() to caller
Browse files Browse the repository at this point in the history
We didn't check error of btrfs_update_inode(), but that error looks
easy to bubble back up.

Reviewed-by: David Sterba <dsterba@suse.cz>
Signed-off-by: Tsutomu Itoh <t-itoh@jp.fujitsu.com>
Signed-off-by: Josef Bacik <jbacik@fusionio.com>
  • Loading branch information
Tsutomu Itoh authored and Chris Mason committed Jul 23, 2012
1 parent 23291a0 commit b995929
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion fs/btrfs/inode.c
Original file line number Diff line number Diff line change
Expand Up @@ -2833,7 +2833,7 @@ static int __btrfs_unlink_inode(struct btrfs_trans_handle *trans,
inode_inc_iversion(inode);
inode_inc_iversion(dir);
inode->i_ctime = dir->i_mtime = dir->i_ctime = CURRENT_TIME;
btrfs_update_inode(trans, root, dir);
ret = btrfs_update_inode(trans, root, dir);
out:
return ret;
}
Expand Down
4 changes: 2 additions & 2 deletions fs/btrfs/tree-log.c
Original file line number Diff line number Diff line change
Expand Up @@ -637,7 +637,7 @@ static noinline int replay_one_extent(struct btrfs_trans_handle *trans,
}

inode_set_bytes(inode, saved_nbytes);
btrfs_update_inode(trans, root, inode);
ret = btrfs_update_inode(trans, root, inode);
out:
if (inode)
iput(inode);
Expand Down Expand Up @@ -1133,7 +1133,7 @@ static noinline int link_to_fixup_dir(struct btrfs_trans_handle *trans,
btrfs_release_path(path);
if (ret == 0) {
btrfs_inc_nlink(inode);
btrfs_update_inode(trans, root, inode);
ret = btrfs_update_inode(trans, root, inode);
} else if (ret == -EEXIST) {
ret = 0;
} else {
Expand Down

0 comments on commit b995929

Please sign in to comment.