From: Minchan Kim Date: Wed, 20 Feb 2013 02:14:41 +0000 (+1100) Subject: mm: Get rid of lockdep whinge on sys_swapon X-Git-Tag: next-20130220~1^2~458 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=4eac293654f0edf84f7adbdafff171c5f7985ff2;p=karo-tx-linux.git 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 --- 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; }