From 4eac293654f0edf84f7adbdafff171c5f7985ff2 Mon Sep 17 00:00:00 2001 From: Minchan Kim Date: Wed, 20 Feb 2013 13:14:41 +1100 Subject: [PATCH] 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 Signed-off-by: Minchan Kim Reported-by: Valdis Kletnieks Tested-by: Valdis Kletnieks Cc: Shaohua Li Signed-off-by: Andrew Morton --- mm/swapfile.c | 1 + 1 file changed, 1 insertion(+) diff --git a/mm/swapfile.c b/mm/swapfile.c index 7df5270fe3c8..9b51266413cd 100644 --- a/mm/swapfile.c +++ b/mm/swapfile.c @@ -1856,6 +1856,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; } -- 2.39.5