summaryrefslogtreecommitdiff
path: root/fs/sync.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2018-05-11 13:13:30 -0700
committerDavid Sterba <dsterba@suse.com>2018-05-28 18:23:44 +0200
commitfd86a3a31506fe4602ad056bc06a16f20e8eb30f (patch)
tree6d0122d556e1ff8fbd6fbac84523403f9d634cd6 /fs/sync.c
parentd1342aadbd9fcc82fd6e24c7f0443a43fe4714c7 (diff)
Btrfs: fix error handling in btrfs_truncate_inode_items()
btrfs_truncate_inode_items() uses two variables for error handling, ret and err. These are not handled consistently, leading to a couple of bugs. - Errors from btrfs_del_items() are handled but not propagated to the caller - If btrfs_run_delayed_refs() fails and aborts the transaction, we continue running Just use ret everywhere and simplify things a bit, fixing both of these issues. Fixes: 79787eaab461 ("btrfs: replace many BUG_ONs with proper error handling") Fixes: 1262133b8d6f ("Btrfs: account for crcs in delayed ref processing") Reviewed-by: Nikolay Borisov <nborisov@suse.com> Signed-off-by: Omar Sandoval <osandov@fb.com> Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/sync.c')
0 files changed, 0 insertions, 0 deletions