From: Tsutomu Itoh Date: Tue, 26 Jun 2012 03:25:22 +0000 (-0600) Subject: Btrfs: return error of btrfs_update_inode() to caller X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b9959295151625c17723103afd79077e80b24ddd;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git Btrfs: return error of btrfs_update_inode() to caller We didn't check error of btrfs_update_inode(), but that error looks easy to bubble back up. Reviewed-by: David Sterba Signed-off-by: Tsutomu Itoh Signed-off-by: Josef Bacik --- diff --git a/fs/btrfs/inode.c b/fs/btrfs/inode.c index fcc65802f367..f93a98e65d6c 100644 --- a/fs/btrfs/inode.c +++ b/fs/btrfs/inode.c @@ -2833,7 +2833,7 @@ err: 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; } diff --git a/fs/btrfs/tree-log.c b/fs/btrfs/tree-log.c index 8abeae4224f9..c86670f4f285 100644 --- a/fs/btrfs/tree-log.c +++ b/fs/btrfs/tree-log.c @@ -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); @@ -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 {