summaryrefslogtreecommitdiffstats
path: root/fs/btrfs/ioctl.c
diff options
context:
space:
mode:
authorOmar Sandoval <osandov@fb.com>2018-05-22 09:59:50 -0700
committerDavid Sterba <dsterba@suse.com>2018-05-30 21:27:32 +0200
commitad7e1a740d940cf7da1beb332a1095bcda40c747 (patch)
tree61e67aefe0abc6f1d4a06e2d34b6dcad94edff71 /fs/btrfs/ioctl.c
parentc5794e51784a0a96dd82e8f955570a7eccf27e5d (diff)
downloadlinux-ad7e1a740d940cf7da1beb332a1095bcda40c747.tar.bz2
Btrfs: clean up error handling in btrfs_truncate()
btrfs_truncate() uses two variables for error handling, ret and err (if this sounds familiar, it's because btrfs_truncate_inode_items() did something similar). This is error prone, as was made evident by "Btrfs: fix error handling in btrfs_truncate()". We only have err because we don't want to mask an error if we call btrfs_update_inode() and btrfs_end_transaction(), so let's make that its own scoped return variable and use ret everywhere else. 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/btrfs/ioctl.c')
0 files changed, 0 insertions, 0 deletions