On Wed, Aug 15, 2018 at 10:52:56AM +0800, Liu Bo wrote: > On Tue, Aug 14, 2018 at 12:46:00PM +0200, David Sterba wrote: > > On Tue, Aug 14, 2018 at 10:47:09AM +0800, Liu Bo wrote: > > > The btrfs_release_path() is just useless as path is only used in error handling. > > > > Where is it duplicated? And I don't think it's useless, while the > > changelog does not explain why and it's not obvious from the context. If > > the path is locked, then releasing it right after it's not needed makes > > sense. There are several potentially heavyweight operations between the > > release and final free. > > I see, the diff context is a little bit misleading, the logic in > btrfs_unlink_subvol() is like, Well, you based you patch on old code, the duplicate btrfs_release_path has been removed in 5b7d687ad5913a56b6a8788435d7a53990b4176d and was in the devel branches since like 2 weeks. The patch removes the first release while it would could have been the other one to save some cycles when the branch with btrfs_search_dir_index_item is not taken.
