path: root/mm
diff options
authorJohn Stultz <>2013-10-07 22:51:59 (GMT)
committerChanho Park <>2014-11-21 10:12:26 (GMT)
commit66d2009169bb981072c32c618aca2b203d6bf897 (patch)
tree0d180c395bdba6c5d19e1d025e2d015e15cd0442 /mm
parent384b43ecf124f8f0959e92252b0a0c1b4996fe0c (diff)
seqcount: Add lockdep functionality to seqcount/seqlock structures
Currently seqlocks and seqcounts don't support lockdep. After running across a seqcount related deadlock in the timekeeping code, I used a less-refined and more focused variant of this patch to narrow down the cause of the issue. This is a first-pass attempt to properly enable lockdep functionality on seqlocks and seqcounts. Since seqcounts are used in the vdso gettimeofday code, I've provided non-lockdep accessors for those needs. I've also handled one case where there were nested seqlock writers and there may be more edge cases. Comments and feedback would be appreciated! Signed-off-by: John Stultz <> Signed-off-by: Peter Zijlstra <> Cc: Eric Dumazet <> Cc: Li Zefan <> Cc: Mathieu Desnoyers <> Cc: Steven Rostedt <> Cc: "David S. Miller" <> Cc: Link: Signed-off-by: Ingo Molnar <>
Diffstat (limited to 'mm')
1 files changed, 1 insertions, 1 deletions
diff --git a/mm/filemap_xip.c b/mm/filemap_xip.c
index 28fe26b..d8d9fe3 100644
--- a/mm/filemap_xip.c
+++ b/mm/filemap_xip.c
@@ -26,7 +26,7 @@
* of ZERO_PAGE(), such as /dev/zero
static DEFINE_MUTEX(xip_sparse_mutex);
-static seqcount_t xip_sparse_seq = SEQCNT_ZERO;
+static seqcount_t xip_sparse_seq = SEQCNT_ZERO(xip_sparse_seq);
static struct page *__xip_sparse_page;
/* called under xip_sparse_mutex */