Re: [PATCH v2 3/6] Btrfs: move get root of btrfs_search_slot to a helper

2018-05-17 Thread Qu Wenruo
On 2018年05月18日 11:00, Liu Bo wrote: > It's good to have a helper instead of having all get-root details > open-coded. > > The new helper locks (if necessary) and sets root node of the path. > > Also invert the checks to make the code flow easier to read. > > There is no functional change in

[PATCH v2 3/6] Btrfs: move get root of btrfs_search_slot to a helper

2018-05-17 Thread Liu Bo
It's good to have a helper instead of having all get-root details open-coded. The new helper locks (if necessary) and sets root node of the path. Also invert the checks to make the code flow easier to read. There is no functional change in this commit. Signed-off-by: Liu Bo