summaryrefslogtreecommitdiffstats
path: root/mm/backing-dev.c
diff options
context:
space:
mode:
authorJohannes Berg <johannes.berg@intel.com>2013-02-22 01:42:47 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2013-02-22 02:22:19 +0100
commitb1ae345d971664f70cfdc293029c40ccfb093591 (patch)
treedcc1e4e8aed9da51a87eca71a8b133a001487381 /mm/backing-dev.c
parentocfs2: unlock super lock if lockres refresh failed (diff)
downloadlinux-b1ae345d971664f70cfdc293029c40ccfb093591.tar.xz
linux-b1ae345d971664f70cfdc293029c40ccfb093591.zip
lockdep: make lockdep_assert_held() not have a return value
I recently made the mistake of writing: foo = lockdep_dereference_protected(..., lockdep_assert_held(...)); which is clearly bogus. If lockdep is disabled in the config this would cause a compile failure, if it is enabled then it compiles and causes a puzzling warning about dereferencing without the correct protection. Wrap the macro in "do { ... } while (0)" to also fail compile for this when lockdep is enabled. Signed-off-by: Johannes Berg <johannes.berg@intel.com> Cc: Peter Zijlstra <peterz@infradead.org> Cc: Ingo Molnar <mingo@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'mm/backing-dev.c')
0 files changed, 0 insertions, 0 deletions