btrfs: remove unnecessary variable shadowing in btrfs_invalidatepage()
In btrfs_invalidatepage() we re-declare @tree variable as btrfs_ordered_inode_tree. Since it's only used to do the spinlock, we can grab it from inode directly, and remove the unnecessary declaration completely. Reviewed-by: Anand Jain <anand.jain@oracle.com> Signed-off-by: Qu Wenruo <wqu@suse.com> Reviewed-by: David Sterba <dsterba@suse.com> Signed-off-by: David Sterba <dsterba@suse.com>
This commit is contained in:
parent
ac5804eb85
commit
d239bcb83b
@ -8413,15 +8413,11 @@ again:
|
|||||||
* for the finish_ordered_io
|
* for the finish_ordered_io
|
||||||
*/
|
*/
|
||||||
if (TestClearPagePrivate2(page)) {
|
if (TestClearPagePrivate2(page)) {
|
||||||
struct btrfs_ordered_inode_tree *tree;
|
spin_lock_irq(&inode->ordered_tree.lock);
|
||||||
|
|
||||||
tree = &inode->ordered_tree;
|
|
||||||
|
|
||||||
spin_lock_irq(&tree->lock);
|
|
||||||
set_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags);
|
set_bit(BTRFS_ORDERED_TRUNCATED, &ordered->flags);
|
||||||
ordered->truncated_len = min(ordered->truncated_len,
|
ordered->truncated_len = min(ordered->truncated_len,
|
||||||
start - ordered->file_offset);
|
start - ordered->file_offset);
|
||||||
spin_unlock_irq(&tree->lock);
|
spin_unlock_irq(&inode->ordered_tree.lock);
|
||||||
|
|
||||||
if (btrfs_dec_test_ordered_pending(inode, &ordered,
|
if (btrfs_dec_test_ordered_pending(inode, &ordered,
|
||||||
start,
|
start,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user