Commit f8d59ec
btrfs: don't pass tree_id in btrfs_search_path_in_tree()
The 'tree_id' parameter in btrfs_search_path_in_tree() was only being
used in order to fetch the root tree to be considered for the
search. For this same reason this function was also requiring a 'struct
btrfs_fs_info' parameter. This commit replaces these two parameters with
a single 'struct btrfs_root' one, which identifies from which root tree
the search should happen.
This function only has one caller, the inode lookup ioctl, which knows
how to provide the root tree for each case. In fact, if args->treeid ==
0, then we don't even have to allocate a new root tree object, and we
can reuse the one provided by the ioctl system call, thus avoiding an
extra allocation.
Signed-off-by: Miquel Sabaté Solà <mssola@mssola.com>
Reviewed-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: Filipe Manana <fdmanana@suse.com>
Signed-off-by: David Sterba <dsterba@suse.com>1 parent 75d6b9d commit f8d59ec
1 file changed
Lines changed: 21 additions & 28 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1664 | 1664 | | |
1665 | 1665 | | |
1666 | 1666 | | |
1667 | | - | |
1668 | | - | |
| 1667 | + | |
| 1668 | + | |
1669 | 1669 | | |
1670 | | - | |
1671 | | - | |
| 1670 | + | |
1672 | 1671 | | |
1673 | | - | |
1674 | 1672 | | |
1675 | 1673 | | |
1676 | 1674 | | |
| |||
1692 | 1690 | | |
1693 | 1691 | | |
1694 | 1692 | | |
1695 | | - | |
1696 | | - | |
1697 | | - | |
1698 | | - | |
1699 | | - | |
1700 | | - | |
1701 | | - | |
1702 | 1693 | | |
1703 | 1694 | | |
1704 | 1695 | | |
1705 | 1696 | | |
1706 | 1697 | | |
1707 | 1698 | | |
1708 | 1699 | | |
1709 | | - | |
1710 | | - | |
1711 | | - | |
1712 | | - | |
1713 | | - | |
| 1700 | + | |
| 1701 | + | |
| 1702 | + | |
1714 | 1703 | | |
1715 | 1704 | | |
1716 | 1705 | | |
| |||
1719 | 1708 | | |
1720 | 1709 | | |
1721 | 1710 | | |
1722 | | - | |
1723 | | - | |
1724 | | - | |
1725 | | - | |
| 1711 | + | |
| 1712 | + | |
1726 | 1713 | | |
1727 | 1714 | | |
1728 | 1715 | | |
| |||
1737 | 1724 | | |
1738 | 1725 | | |
1739 | 1726 | | |
1740 | | - | |
1741 | | - | |
1742 | | - | |
1743 | | - | |
| 1727 | + | |
| 1728 | + | |
1744 | 1729 | | |
1745 | 1730 | | |
1746 | 1731 | | |
| |||
1884 | 1869 | | |
1885 | 1870 | | |
1886 | 1871 | | |
| 1872 | + | |
1887 | 1873 | | |
1888 | 1874 | | |
1889 | 1875 | | |
| |||
1897 | 1883 | | |
1898 | 1884 | | |
1899 | 1885 | | |
| 1886 | + | |
| 1887 | + | |
1900 | 1888 | | |
1901 | 1889 | | |
1902 | 1890 | | |
| |||
1908 | 1896 | | |
1909 | 1897 | | |
1910 | 1898 | | |
1911 | | - | |
1912 | | - | |
1913 | | - | |
| 1899 | + | |
| 1900 | + | |
| 1901 | + | |
| 1902 | + | |
| 1903 | + | |
| 1904 | + | |
| 1905 | + | |
| 1906 | + | |
1914 | 1907 | | |
1915 | 1908 | | |
1916 | 1909 | | |
| |||
0 commit comments