Skip to contentSkip to conversation

mm: Get rid of lockdep whinge on sys_swapon

PATCH New Minchan Kim 1 participant 1 message Feb 5, 2013

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

PATCH 1/1 mm: Get rid of lockdep whinge on sys_swapon

[1] forgot to initialize spin_lock so lockdep is whingeing about it. This patch fixes it.

[1] 0f181e0e4, swap: add per-partition lock for swapfile

Cc: Shaohua Li <[email protected]>
Reported/Tested-by: Valdis Kletnieks <[email protected]>

---
 mm/swapfile.c | 1 +
 1 file changed, 1 insertion(+)
mm/swapfile.c +1 -0
index dfaff5f..ac190d6 100644
@@ -1857,6 +1857,7 @@ static struct swap_info_struct *alloc_swap_info(void)
 	p->flags = SWP_USED;
 	p->next = -1;
 	spin_unlock(&swap_lock);
+	spin_lock_init(&p->lock);
 
 	return p;
 }
Signature · 7 lines
1.8.1.1

--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to [email protected].  For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"[email protected]"> [email protected] </a>