提交 79b4f4c6 编写于 作者: D David Sterba

btrfs: cleanup duplicate return value in insert_inline_extent

The pattern when err is used for function exit and ret is used for
return values of callees is not used here.
Reviewed-by: NNikolay Borisov <nborisov@suse.com>
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 6165572c
...@@ -177,7 +177,6 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, ...@@ -177,7 +177,6 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans,
char *kaddr; char *kaddr;
unsigned long ptr; unsigned long ptr;
struct btrfs_file_extent_item *ei; struct btrfs_file_extent_item *ei;
int err = 0;
int ret; int ret;
size_t cur_size = size; size_t cur_size = size;
unsigned long offset; unsigned long offset;
...@@ -199,10 +198,8 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, ...@@ -199,10 +198,8 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans,
path->leave_spinning = 1; path->leave_spinning = 1;
ret = btrfs_insert_empty_item(trans, root, path, &key, ret = btrfs_insert_empty_item(trans, root, path, &key,
datasize); datasize);
if (ret) { if (ret)
err = ret;
goto fail; goto fail;
}
} }
leaf = path->nodes[0]; leaf = path->nodes[0];
ei = btrfs_item_ptr(leaf, path->slots[0], ei = btrfs_item_ptr(leaf, path->slots[0],
...@@ -257,9 +254,8 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans, ...@@ -257,9 +254,8 @@ static int insert_inline_extent(struct btrfs_trans_handle *trans,
BTRFS_I(inode)->disk_i_size = inode->i_size; BTRFS_I(inode)->disk_i_size = inode->i_size;
ret = btrfs_update_inode(trans, root, inode); ret = btrfs_update_inode(trans, root, inode);
return ret;
fail: fail:
return err; return ret;
} }
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册