@@ -275,11 +275,11 @@ static void wait_entry_unlocked(struct xa_state *xas, void *entry)
275
275
finish_wait (wq , & ewait .wait );
276
276
}
277
277
278
- static void put_unlocked_entry (struct xa_state * xas , void * entry )
278
+ static void put_unlocked_entry (struct xa_state * xas , void * entry ,
279
+ enum dax_wake_mode mode )
279
280
{
280
- /* If we were the only waiter woken, wake the next one */
281
281
if (entry && !dax_is_conflict (entry ))
282
- dax_wake_entry (xas , entry , WAKE_NEXT );
282
+ dax_wake_entry (xas , entry , mode );
283
283
}
284
284
285
285
/*
@@ -633,7 +633,7 @@ struct page *dax_layout_busy_page_range(struct address_space *mapping,
633
633
entry = get_unlocked_entry (& xas , 0 );
634
634
if (entry )
635
635
page = dax_busy_page (entry );
636
- put_unlocked_entry (& xas , entry );
636
+ put_unlocked_entry (& xas , entry , WAKE_NEXT );
637
637
if (page )
638
638
break ;
639
639
if (++ scanned % XA_CHECK_SCHED )
@@ -675,7 +675,7 @@ static int __dax_invalidate_entry(struct address_space *mapping,
675
675
mapping -> nrexceptional -- ;
676
676
ret = 1 ;
677
677
out :
678
- put_unlocked_entry (& xas , entry );
678
+ put_unlocked_entry (& xas , entry , WAKE_NEXT );
679
679
xas_unlock_irq (& xas );
680
680
return ret ;
681
681
}
@@ -954,7 +954,7 @@ static int dax_writeback_one(struct xa_state *xas, struct dax_device *dax_dev,
954
954
return ret ;
955
955
956
956
put_unlocked :
957
- put_unlocked_entry (xas , entry );
957
+ put_unlocked_entry (xas , entry , WAKE_NEXT );
958
958
return ret ;
959
959
}
960
960
@@ -1695,7 +1695,7 @@ dax_insert_pfn_mkwrite(struct vm_fault *vmf, pfn_t pfn, unsigned int order)
1695
1695
/* Did we race with someone splitting entry or so? */
1696
1696
if (!entry || dax_is_conflict (entry ) ||
1697
1697
(order == 0 && !dax_is_pte_entry (entry ))) {
1698
- put_unlocked_entry (& xas , entry );
1698
+ put_unlocked_entry (& xas , entry , WAKE_NEXT );
1699
1699
xas_unlock_irq (& xas );
1700
1700
trace_dax_insert_pfn_mkwrite_no_entry (mapping -> host , vmf ,
1701
1701
VM_FAULT_NOPAGE );
0 commit comments