On 2020/12/17 下午1:59, Nikolay Borisov wrote:
On 17.12.20 г. 7:55 ч., Nikolay Borisov wrote:
On 17.12.20 г. 6:57 ч., Qu Wenruo wrote:
In btrfs_invalidatepage() we re-declare @tree variable as
btrfs_ordered_inode_tree.
Remove such variable shadowing which can be very confusing.
You can't do that, because lock_extent_bits expects extent_io_tree !
Ok, nvm, you just factored the var at the beginning of the functions.
OTOH since the ordered tree is used just for lock/unlock why not do
spin_(un)lock(&inode->ordered_tree->lock);
Oh, that indeed looks better and since Su is also complaining about the
declaration at the beginning of the function, I guess that's the better
way to go.
Thanks,
Qu