Commit bae7d4c
btrfs: simplify leaf traversal after path release in btrfs_next_old_leaf()
After releasing the path in btrfs_next_old_leaf(), we need to re-check the leaf
because a balance operation may have added items or removed the last item. The
original code handled this with two separate conditional blocks, the second
marked with a lengthy comment explaining a "missed case".
Merge these two blocks into a single logical structure that handles both
scenarios more clearly.
Also update the comment to be more concise and accurate, incorporating the
explanation directly into the main block rather than a separate annotation.
No functional change.
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 6d2ba15 commit bae7d4c
1 file changed
+13
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4854 | 4854 | | |
4855 | 4855 | | |
4856 | 4856 | | |
4857 | | - | |
4858 | | - | |
4859 | | - | |
4860 | | - | |
4861 | | - | |
4862 | | - | |
4863 | | - | |
4864 | | - | |
4865 | | - | |
4866 | | - | |
4867 | | - | |
4868 | | - | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
4872 | | - | |
| 4857 | + | |
| 4858 | + | |
4873 | 4859 | | |
4874 | | - | |
4875 | | - | |
| 4860 | + | |
| 4861 | + | |
4876 | 4862 | | |
4877 | | - | |
4878 | | - | |
4879 | | - | |
4880 | | - | |
| 4863 | + | |
4881 | 4864 | | |
4882 | | - | |
4883 | | - | |
4884 | | - | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
| 4871 | + | |
| 4872 | + | |
4885 | 4873 | | |
4886 | 4874 | | |
4887 | 4875 | | |
| |||
0 commit comments