summaryrefslogtreecommitdiff
path: root/fs/fs_struct.c
diff options
context:
space:
mode:
authorJohn Stultz <john.stultz@linaro.org>2013-10-08 02:51:59 +0400
committerIngo Molnar <mingo@kernel.org>2013-11-06 15:40:26 +0400
commit1ca7d67cf5d5a2aef26a8d9afd789006fa098347 (patch)
tree8f4f7d1f189d7a08983ab5ef522330f08f337459 /fs/fs_struct.c
parent827da44c61419f29ae3be198c342e2147f1a10cb (diff)
downloadlinux-1ca7d67cf5d5a2aef26a8d9afd789006fa098347.tar.xz
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 <john.stultz@linaro.org> Signed-off-by: Peter Zijlstra <peterz@infradead.org> Cc: Eric Dumazet <eric.dumazet@gmail.com> Cc: Li Zefan <lizefan@huawei.com> Cc: Mathieu Desnoyers <mathieu.desnoyers@efficios.com> Cc: Steven Rostedt <rostedt@goodmis.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: netdev@vger.kernel.org Link: http://lkml.kernel.org/r/1381186321-4906-3-git-send-email-john.stultz@linaro.org Signed-off-by: Ingo Molnar <mingo@kernel.org>
Diffstat (limited to 'fs/fs_struct.c')
-rw-r--r--fs/fs_struct.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs_struct.c b/fs/fs_struct.c
index d8ac61d0c932..7dca743b2ce1 100644
--- a/fs/fs_struct.c
+++ b/fs/fs_struct.c
@@ -161,6 +161,6 @@ EXPORT_SYMBOL(current_umask);
struct fs_struct init_fs = {
.users = 1,
.lock = __SPIN_LOCK_UNLOCKED(init_fs.lock),
- .seq = SEQCNT_ZERO,
+ .seq = SEQCNT_ZERO(init_fs.seq),
.umask = 0022,
};