Commit ed7b63eb authored by Josef Bacik's avatar Josef Bacik Committed by Chris Mason

Btrfs: only clear dirty on the buffer if it is marked as dirty

No reason to set the path blocking or loop through all of the pages if the
extent buffer isn't actually marked dirty.  Thanks,
Signed-off-by: default avatarJosef Bacik <jbacik@fusionio.com>
Signed-off-by: default avatarChris Mason <chris.mason@fusionio.com>
parent bb146eb2
...@@ -1142,11 +1142,11 @@ void clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root, ...@@ -1142,11 +1142,11 @@ void clean_tree_block(struct btrfs_trans_handle *trans, struct btrfs_root *root,
root->fs_info->dirty_metadata_bytes); root->fs_info->dirty_metadata_bytes);
} }
spin_unlock(&root->fs_info->delalloc_lock); spin_unlock(&root->fs_info->delalloc_lock);
}
/* ugh, clear_extent_buffer_dirty needs to lock the page */ /* ugh, clear_extent_buffer_dirty needs to lock the page */
btrfs_set_lock_blocking(buf); btrfs_set_lock_blocking(buf);
clear_extent_buffer_dirty(buf); clear_extent_buffer_dirty(buf);
}
} }
} }
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment