提交 aaafa1eb 编写于 作者: N Naohiro Aota 提交者: David Sterba

btrfs: replace unnecessary goto with direct return at cow_file_range()

The 'goto out' in cow_file_range() in the exit block are not necessary
and jump back. Replace them with return, while still keeping 'goto out'
in the main code.
Reviewed-by: NFilipe Manana <fdmanana@suse.com>
Signed-off-by: NNaohiro Aota <naohiro.aota@wdc.com>
Reviewed-by: NDavid Sterba <dsterba@suse.com>
[ keep goto in the main code, update changelog ]
Signed-off-by: NDavid Sterba <dsterba@suse.com>
上级 71aa147b
......@@ -1413,7 +1413,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
page_ops);
start += cur_alloc_size;
if (start >= end)
goto out;
return ret;
}
/*
......@@ -1425,7 +1425,7 @@ static noinline int cow_file_range(struct btrfs_inode *inode,
extent_clear_unlock_delalloc(inode, start, end, locked_page,
clear_bits | EXTENT_CLEAR_DATA_RESV,
page_ops);
goto out;
return ret;
}
/*
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册