diff options
author | Johannes Thumshirn <jthumshirn@suse.de> | 2018-12-12 17:14:17 +0300 |
---|---|---|
committer | David Sterba <dsterba@suse.com> | 2018-12-17 16:51:50 +0300 |
commit | 1690dd41e0cb1dade80850ed8a3eb0121b96d22f (patch) | |
tree | dcd75c0ec0b6036fdf05c62837b07f51cc6adce2 /fs/btrfs/scrub.c | |
parent | 34a28e3d77535efc7761aa8d67275c07d1fe2c58 (diff) |
btrfs: improve error handling of btrfs_add_link
In the error handling block, err holds the return value of either
btrfs_del_root_ref() or btrfs_del_inode_ref() but it hasn't been checked
since it's introduction with commit fe66a05a0679 (Btrfs: improve error
handling for btrfs_insert_dir_item callers) in 2012.
If the error handling in the error handling fails, there's not much left
to do and the abort either happened earlier in the callees or is
necessary here.
So if one of btrfs_del_root_ref() or btrfs_del_inode_ref() failed, abort
the transaction, but still return the original code of the failure
stored in 'ret' as this will be reported to the user.
Signed-off-by: Johannes Thumshirn <jthumshirn@suse.de>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>
Diffstat (limited to 'fs/btrfs/scrub.c')
0 files changed, 0 insertions, 0 deletions