author: Sebastian Andrzej Siewior <bigeasy@linutronix.de> 2019-02-11 10:40:46 +0100
committer: Minda Chen <minda.chen@starfivetech.com> 2023-11-06 19:24:43 +0800
commit: 36b1ad1d547b2da448f29b8fd77f316ab25a4cba
parent: 92b58b68fb34ac00126a937e0b35cf3717d46d34
Commit Summary:
Diffstat:
1 file changed, 4 insertions, 1 deletion
diff --git a/mm/workingset.c b/mm/workingset.c
index d5b81e4f4cbe..d7ceee62e3c6 100644
--- a/mm/workingset.c
+++ b/mm/workingset.c
@@ -433,6 +433,8 @@ static struct list_lru shadow_nodes;
void workingset_update_node(struct xa_node *node)
{
+ struct address_space *mapping;
+
/*
* Track non-empty nodes that contain only shadow entries;
* unlink those that contain pages or are being freed.
@@ -441,7 +443,8 @@ void workingset_update_node(struct xa_node *node)
* already where they should be. The list_empty() test is safe
* as node->private_list is protected by the i_pages lock.
*/
- VM_WARN_ON_ONCE(!irqs_disabled()); /* For __inc_lruvec_page_state */
+ mapping = container_of(node->array, struct address_space, i_pages);
+ lockdep_assert_held(&mapping->i_pages.xa_lock);
if (node->count && node->count == node->nr_values) {
if (list_empty(&node->private_list)) {