Commit fe9d99f
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.
Signed-off-by: Sun YangKai <sunk67188@gmail.com>
Reviewed-by: David Sterba <dsterba@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 494bf38 commit fe9d99f
1 file changed
+14
-25
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4853 | 4853 | | |
4854 | 4854 | | |
4855 | 4855 | | |
4856 | | - | |
4857 | | - | |
4858 | | - | |
4859 | | - | |
4860 | | - | |
4861 | | - | |
4862 | | - | |
4863 | | - | |
4864 | | - | |
4865 | | - | |
4866 | | - | |
4867 | | - | |
4868 | | - | |
4869 | | - | |
4870 | | - | |
4871 | | - | |
| 4856 | + | |
| 4857 | + | |
4872 | 4858 | | |
4873 | | - | |
4874 | | - | |
| 4859 | + | |
| 4860 | + | |
4875 | 4861 | | |
4876 | | - | |
4877 | | - | |
4878 | | - | |
4879 | | - | |
| 4862 | + | |
| 4863 | + | |
4880 | 4864 | | |
4881 | | - | |
4882 | | - | |
4883 | | - | |
| 4865 | + | |
| 4866 | + | |
| 4867 | + | |
| 4868 | + | |
| 4869 | + | |
| 4870 | + | |
| 4871 | + | |
| 4872 | + | |
4884 | 4873 | | |
4885 | 4874 | | |
4886 | 4875 | | |
| |||
0 commit comments