diff options
author | John Stultz <john.stultz@linaro.org> | 2013-10-07 15:51:59 -0700 |
---|---|---|
committer | Inki Dae <inki.dae@samsung.com> | 2014-10-15 20:05:14 +0900 |
commit | 4765450a001ac146fa75fffe42369102255e63ae (patch) | |
tree | d952f55b643d3f0abc837ac0e06688613e347138 /fs/fs_struct.c | |
parent | dfb3dea9d721b34bb318416d6d056a10898ca2c8 (diff) | |
download | linux-3.10-4765450a001ac146fa75fffe42369102255e63ae.tar.gz linux-3.10-4765450a001ac146fa75fffe42369102255e63ae.tar.bz2 linux-3.10-4765450a001ac146fa75fffe42369102255e63ae.zip |
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.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/fs_struct.c b/fs/fs_struct.c index d8ac61d0c93..7dca743b2ce 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, }; |