]> git.proxmox.com Git - mirror_ubuntu-eoan-kernel.git/commitdiff
Btrfs: return error of btrfs_update_inode() to caller
authorTsutomu Itoh <t-itoh@jp.fujitsu.com>
Tue, 26 Jun 2012 03:25:22 +0000 (21:25 -0600)
committerChris Mason <chris.mason@fusionio.com>
Mon, 23 Jul 2012 20:27:54 +0000 (16:27 -0400)
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>
fs/btrfs/inode.c
fs/btrfs/tree-log.c

index fcc65802f367dd16d066a45d2149761af0aae042..f93a98e65d6cace3e108844592c7722c8c75bfc1 100644 (file)
@@ -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;
 }
index 8abeae4224f92dbd870877b76224515c304e979d..c86670f4f2855ef3ee2f8252c54d5bd4c37f1ec6 100644 (file)
@@ -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 {