Skip to contentSkip to conversation

aa-190-block_flushpage_check

PATCH Andrew Morton 1 participant 1 message Mar 20, 2002

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

bugcheck. It's needed - if the page had locked buffers here we'd do a lock_buffer() inside spinlock.

=====================================

mm/swap_state.c renamed from mm/swap_state.c~aa-190-block_flushpage_check +3 -1
@@ -117,7 +117,9 @@ void delete_from_swap_cache(struct page 
 	if (!PageLocked(page))
 		BUG();
 
-	block_flushpage(page, 0);
+	if (!block_flushpage(page, 0))
+		/* an anonymous page cannot have page->buffers set */
+		BUG();
 
 	entry.val = page->index;
 

-