From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>,
Minchan Kim <minchan@kernel.org>, Shaohua Li <shli@kernel.org>
Subject: [PATCH] mm: Get rid of lockdep whinge on sys_swapon
Date: Wed, 6 Feb 2013 08:17:12 +0900 [thread overview]
Message-ID: <1360106232-15501-1-git-send-email-minchan@kernel.org> (raw)
[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 <shli@kernel.org>
Reported/Tested-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
mm/swapfile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index dfaff5f..ac190d6 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -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;
}
--
1.8.1.1
--
To unsubscribe, send a message with 'unsubscribe linux-mm' in
the body to majordomo@kvack.org. For more info on Linux MM,
see: http://www.linux-mm.org/ .
Don't email: <a href=mailto:"dont@kvack.org"> email@kvack.org </a>
WARNING: multiple messages have this Message-ID (diff)
From: Minchan Kim <minchan@kernel.org>
To: Andrew Morton <akpm@linux-foundation.org>
Cc: linux-mm@kvack.org, linux-kernel@vger.kernel.org,
Valdis Kletnieks <Valdis.Kletnieks@vt.edu>,
Minchan Kim <minchan@kernel.org>, Shaohua Li <shli@kernel.org>
Subject: [PATCH] mm: Get rid of lockdep whinge on sys_swapon
Date: Wed, 6 Feb 2013 08:17:12 +0900 [thread overview]
Message-ID: <1360106232-15501-1-git-send-email-minchan@kernel.org> (raw)
[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 <shli@kernel.org>
Reported/Tested-by: Valdis Kletnieks <Valdis.Kletnieks@vt.edu>
Signed-off-by: Minchan Kim <minchan@kernel.org>
---
mm/swapfile.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/mm/swapfile.c b/mm/swapfile.c
index dfaff5f..ac190d6 100644
--- a/mm/swapfile.c
+++ b/mm/swapfile.c
@@ -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;
}
--
1.8.1.1
next reply other threads:[~2013-02-05 23:17 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-02-05 23:17 Minchan Kim [this message]
2013-02-05 23:17 ` [PATCH] mm: Get rid of lockdep whinge on sys_swapon Minchan Kim
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1360106232-15501-1-git-send-email-minchan@kernel.org \
--to=minchan@kernel.org \
--cc=Valdis.Kletnieks@vt.edu \
--cc=akpm@linux-foundation.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-mm@kvack.org \
--cc=shli@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.