Skip to content

Commit e40b6e2

Browse files
fdmananakdave
authored andcommitted
btrfs: return real error from read_alloc_one_name() in drop_one_dir_item()
If read_alloc_one_name() we explicitly return -ENOMEM and currently that is fine since it's the only error read_alloc_one_name() can return for now. However this is fragile and not future proof, so return instead what read_alloc_one_name() returned. Reviewed-by: Boris Burkov <[email protected]> Reviewed-by: Qu Wenruo <[email protected]> Signed-off-by: Filipe Manana <[email protected]>
1 parent 8631c95 commit e40b6e2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

fs/btrfs/tree-log.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ static noinline int drop_one_dir_item(struct btrfs_trans_handle *trans,
950950
btrfs_dir_item_key_to_cpu(leaf, di, &location);
951951
ret = read_alloc_one_name(leaf, di + 1, btrfs_dir_name_len(leaf, di), &name);
952952
if (ret)
953-
return -ENOMEM;
953+
return ret;
954954

955955
btrfs_release_path(path);
956956

0 commit comments

Comments
 (0)